Merge "[Feature][T106]add script to make T106"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/classes/workonsrc.bbclass b/cap/zx297520v3/sources/meta-zxic-custom/classes/workonsrc.bbclass
index 1137e98..dc3dc43 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/classes/workonsrc.bbclass
+++ b/cap/zx297520v3/sources/meta-zxic-custom/classes/workonsrc.bbclass
@@ -131,6 +131,8 @@
continue
bb.build.deltask(task, d)
+
+ #d.prependVarFlag('do_deploy_source_date_epoch', 'prefuncs','create_source_date_epoch_stamp ')
d.prependVarFlag('do_compile', 'prefuncs', "workonsrc_compile_prefunc ")
d.prependVarFlag('do_configure', 'prefuncs', "workonsrc_configure_prefunc ")
@@ -154,8 +156,27 @@
d.setVar('CONFIGURESTAMPFILE', configstamp)
d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}')
d.setVar('STAMPCLEAN', '${STAMPS_DIR}/work-shared/${PN}/*-*')
+
}
+
+python create_source_date_epoch_stamp() {
+ import oe.reproducible
+
+ epochfile = d.getVar('SDE_FILE')
+ tmp_file = "%s.new" % epochfile
+
+ source_date_epoch = oe.reproducible.get_source_date_epoch(d, d.getVar('S'))
+
+ bb.debug(1, "SOURCE_DATE_EPOCH: %d" % source_date_epoch)
+ bb.utils.mkdirhier(d.getVar('SDE_DIR'))
+ with open(tmp_file, 'w') as f:
+ f.write(str(source_date_epoch))
+
+ os.rename(tmp_file, epochfile)
+}
+do_package[prefuncs] += "create_source_date_epoch_stamp"
+#do_package[prefuncs] += "do_deploy_source_date_epoch_setscene"
python workonsrc_configure_prefunc() {
srctree_rsync_files(d)
s_dir = d.getVar('S')
@@ -211,6 +232,7 @@
fi
}
+
def srctree_rsync_files(d):
import subprocess, os.path
@@ -277,6 +299,7 @@
ret = s_dir + '/*:True'
return ret
+
def srctree_configure_hash_files(d):
"""
Get the list of files that should trigger do_configure to re-execute,
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/cpe-base.inc b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/cpe-base.inc
index d0af8ae..e97e4d5 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/cpe-base.inc
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/cpe-base.inc
@@ -18,6 +18,8 @@
ROOT_HOME ?= "/root"
+#define BSDPDIR for esdk
+BSPDIR ?= "${TOPDIR}"
# zxic version path
BINS-PATH = "${BSPDIR}/../allbins/${MACHINE}/${DISTRO}/bins"
ELFS-PATH = "${BSPDIR}/../allbins/${MACHINE}/${DISTRO}/elf/${BOOT_CTL}"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/v2x-base.inc b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/v2x-base.inc
index 0ea61c4..94f3db3 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/v2x-base.inc
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/include/v2x-base.inc
@@ -16,6 +16,8 @@
#MULTILIBS = "multilib:lib32"
#DEFAULTTUNE_virtclass-multilib-lib32 = "armv7a"
+#define BSDPDIR for esdk
+BSPDIR ?= "${TOPDIR}"
# zxic version path
BINS-PATH = "${BSPDIR}/../allbins/${MACHINE}/${DISTRO}/bins"
ELFS-PATH = "${BSPDIR}/../allbins/${MACHINE}/${DISTRO}/elf/${BOOT_CTL}"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf
index 16e7981..0b1ba0e 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc.conf
@@ -154,6 +154,9 @@
liblynq-sms \
liblynq-data \
liblynq-qser-voice \
+ liblynq-qser-sim \
+ liblynq-qser-sms \
+ liblynq-qser-data \
"
zxic_lib += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', 'libbinder libril', 'libtelsvr', d)}"
@@ -257,3 +260,77 @@
"
PACKAGE_EXCLUDE = "eudev"
+
+
+#DISTRO = "lynq_vehicle_dc"
+#DISTRO_NAME = "lynq distro vehicle_dc"
+RAT_CONFIG_C2K_SUPPORT = "no"
+MTK_MULTI_SIM_SUPPORT = "dsds"
+TARGET_PLATFORM = "T106"
+MTK_LED_SUPPORT = "no"
+#support lynq_atsvc [hong.liu add for lynq atsvc on 2022.12.1]
+LYNQ_ATSVC_SUPPORT = "yes"
+
+#GPIO_CFG value:"PLATFORM" , "GENVICT" ,"GSW"
+MOBILETEK_GPIO_CFG = "PLATFORM"
+
+#PLL_CFG value:"PLATFORM","GSW"
+MOBILETEK_PLL_CFG = "PLATFORM"
+
+#RTP_CFG value:"PLATFORM","GSW"
+MOBILETEK_RTP_CFG = "PLATFORM"
+
+#MEDIA_CFG value:"PLATFORM","GSW"
+MOBILETEK_MEDIA_CFG = "PLATFORM"
+
+#LOG_CFG value:"PLATFORM","GSW"
+MOBILETEK_LOG_CFG = "PLATFORM"
+
+#FOTA_CFG value:"PLATFORM","GSW"
+MOBILETEK_FOTA_CFG = "PLATFORM"
+
+#RIL_CFG value:"PLATFORM","GSW"
+MOBILETEK_RIL_CFG = "PLATFORM"
+
+#UART_CFG value:"PLATFORM","GSW"
+MOBILETEK_UART_CFG = "PLATFORM"
+
+#USB_CFG value:"PLATFORM","GSW"
+MOBILETEK_USB_CFG = "PLATFORM"
+
+#ndis_CFG value:"PLATFORM","GSW"
+MOBILETEK_NDIS_CFG = "PLATFORM"
+
+#SUSPEND_CFG value:"PLATFORM","GSW"
+MOBILETEK_SUSPEND_CFG = "PLATFORM"
+
+#MNLDLOG_CFG value:"PLATFORM","GSW"
+MOBILETEK_MNLDLOG_CFG = "PLATFORM"
+
+#OPTEE_CFG value:"PLATFORM","GSW"
+MOBILETEK_OPTEE_CFG = "PLATFORM"
+
+#EMMC_CFG value:"PLATFORM","GSW"
+MOBILETEK_EMMC_CFG = "PLATFORM"
+
+#WIFIKERNELCODE_CFG value:"PLATFORM","GSW"
+MOBILETEK_WIFIKERNELCODE_CFG = "PLATFORM"
+
+#SYSTEMD_CFG value:"PLATFORM","GSW"
+MOBILETEK_SYSTEMD_CFG = "PLATFORM"
+
+#GSTREAMER_CFG value:"PLATFORM","GSW"
+MOBILETEK_GSTREAMER_CFG = "PLATFORM"
+
+#BUSYBOX_CFG value:"PLATFORM","GSW"
+MOBILETEK_BUSYBOX_CFG = "PLATFORM"
+
+#OPENSSH_CFG value:"PLATFORM","GSW"
+MOBILETEK_OPENSSH_CFG = "PLATFORM"
+
+#OEMAPP_CFG value:"PLATFORM","GSW"
+MOBILETEK_OEMAPP_CFG = "PLATFORM"
+
+LYNQ_CONFIG_COMMITID = "e2a3410390ff0ad762462ccb6af8faa5e16dcd61"
+LYNQ_CONFIG_VERSION = "T106_ap_version_cap_0425"
+LYNQ_CONFIG_SW_VERSION = "T106_ap_version_MR3.02b06.00"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/cache b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/cache
deleted file mode 120000
index b39373f..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/cache
+++ /dev/null
@@ -1 +0,0 @@
-/mnt/userdata/cache
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/TZ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/TZ
deleted file mode 120000
index 4de4a0d..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/TZ
+++ /dev/null
@@ -1 +0,0 @@
-/etc_rw/TZ
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/rcS.d/S14fscheck.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/rcS.d/S14fscheck.sh
deleted file mode 120000
index 1c1890f..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/rcS.d/S14fscheck.sh
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/fscheck.sh
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/rcS.d/S17zcatlog_config.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/rcS.d/S17zcatlog_config.sh
deleted file mode 120000
index f202c6a..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/rcS.d/S17zcatlog_config.sh
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/zcatlog_config.sh
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/resolv.conf b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/resolv.conf
deleted file mode 120000
index e9d7747..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/etc/resolv.conf
+++ /dev/null
@@ -1 +0,0 @@
-/etc_rw/resolv.conf
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/postinstall.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/postinstall.sh
new file mode 100644
index 0000000..d4ffd76
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc/fs/normal/rootfs/postinstall.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+ln -s /mnt/userdata/cache cache
+ln -s /etc/init.d/fscheck.sh ./etc/rcS.d/S14fscheck.sh
+ln -s /etc/init.d/zcatlog_config.sh ./etc/rcS.d/S17zcatlog_config.sh
+ln -s /etc_rw/resolv.conf ./etc/resolv.conf
+ln -s /etc_rw/TZ ./etc/TZ
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/TZ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/TZ
deleted file mode 120000
index 4de4a0d..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/TZ
+++ /dev/null
@@ -1 +0,0 @@
-/etc_rw/TZ
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/rcS.d/S14fscheck.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/rcS.d/S14fscheck.sh
deleted file mode 120000
index 1c1890f..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/rcS.d/S14fscheck.sh
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/fscheck.sh
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/rcS.d/S17zcatlog_config.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/rcS.d/S17zcatlog_config.sh
deleted file mode 120000
index f202c6a..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/rcS.d/S17zcatlog_config.sh
+++ /dev/null
@@ -1 +0,0 @@
-../init.d/zcatlog_config.sh
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/resolv.conf b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/resolv.conf
deleted file mode 120000
index e9d7747..0000000
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/etc/resolv.conf
+++ /dev/null
@@ -1 +0,0 @@
-/etc_rw/resolv.conf
\ No newline at end of file
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/postinstall.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/postinstall.sh
new file mode 100644
index 0000000..48c6d1d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_4Gb/fs/normal/rootfs/postinstall.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+ln -s /mnt/oemdata/cache cache
+ln -s /etc/init.d/fscheck.sh ./etc/rcS.d/S14fscheck.sh
+ln -s /etc/init.d/zcatlog_config.sh ./etc/rcS.d/S17zcatlog_config.sh
+ln -s /etc_rw/resolv.conf ./etc/resolv.conf
+ln -s /etc_rw/TZ ./etc/TZ
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh
new file mode 100644
index 0000000..48c6d1d
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/postinstall.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+ln -s /mnt/oemdata/cache cache
+ln -s /etc/init.d/fscheck.sh ./etc/rcS.d/S14fscheck.sh
+ln -s /etc/init.d/zcatlog_config.sh ./etc/rcS.d/S17zcatlog_config.sh
+ln -s /etc_rw/resolv.conf ./etc/resolv.conf
+ln -s /etc_rw/TZ ./etc/TZ
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
index 0eea53e..24aefb5 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/zxic-image.bb
@@ -112,6 +112,9 @@
fakeroot distro_rootfs_files_vehicle() {
rm -rf ${IMAGE_ROOTFS}/boot
cp -arfp ${FS-DIR}/fs/${BOOT_CTL}/rootfs/* ${IMAGE_ROOTFS}/
+ if [ -f ${IMAGE_ROOTFS}/postinstall.sh ]; then
+ cd ${IMAGE_ROOTFS} && sh postinstall.sh && rm -v ${IMAGE_ROOTFS}/postinstall.sh
+ fi
rm -rf ${IMAGE_ROOTFS}/etc/rc[0-6].d
rm -f ${IMAGE_ROOTFS}/etc/fstab
rm -f ${IMAGE_ROOTFS}/etc/default/rcS
@@ -202,6 +205,7 @@
mksquashfs4 ${S}/oem ${IMGDEPLOYDIR}/oem.squashfs_tmp ${ROOTFS_SQUASHFS_ARGS}
echo "oem squashfs need ubinize-image on nand flash"
${B}/ubinize-static.sh vol_oem "${BINS-PATH}/cap_oem.img" ${IMGDEPLOYDIR}/oem.squashfs_tmp "${UBINIZE_ARGS}"
+ mkdir -p ${ELFS-PATH}
cd ${S}/oem/../ && tar -czvf ${ELFS-PATH}/oem.tgz oem
rm -rf ${IMGDEPLOYDIR}/oem.squashfs_tmp
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libapn/libapn.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libapn/libapn.bb
index 8d177ab..5229666 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libapn/libapn.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libapn/libapn.bb
@@ -1,13 +1,21 @@
-inherit externalsrc package
+#inherit externalsrc package
DESCRIPTION = "apn database"
LICENSE = "MediaTekProprietary"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
DEPENDS = "libxml2 libbinder"
+
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST}"
WORKONSRC = "${TOPDIR}/../src/lynq/lib/apn"
-inherit deploy workonsrc
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://apn \
+ "
+
+SRC-DIR = "${S}/../apn"
+
+#inherit deploy workonsrc
EXTRA_OEMAKE = "'CROSS=${TARGET_PREFIX}'\
'PROJECT=${PROJ}'\
@@ -28,18 +36,18 @@
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float" LDFLAGS="${LDFLAGS}" ROOT=${STAGING_DIR_HOST} OFLAGS="${BB_INCLUDE_ADD}" SYS_CFLAGS="${BB_INCLUDE_ADD}"
+ oe_runmake all -C ${SRC-DIR} BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float" LDFLAGS="${LDFLAGS}" ROOT=${STAGING_DIR_HOST} OFLAGS="${BB_INCLUDE_ADD}" SYS_CFLAGS="${BB_INCLUDE_ADD}"
else
- oe_runmake all BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float" CXX="${CXX} ${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ROOT=${STAGING_DIR_HOST} OFLAGS="${BB_INCLUDE_ADD}" SYS_CFLAGS="${BB_INCLUDE_ADD}"
+ oe_runmake all -C ${SRC-DIR} BB_CFLAGS_ADD="--sysroot=${STAGING_DIR_HOST} -mhard-float" CXX="${CXX} ${CXXFLAGS}" LDFLAGS="${LDFLAGS}" ROOT=${STAGING_DIR_HOST} OFLAGS="${BB_INCLUDE_ADD}" SYS_CFLAGS="${BB_INCLUDE_ADD}"
fi
}
do_install() {
install -d ${D}${includedir}
install ${WORKONSRC}/inc/apn_interface.h ${D}${includedir}
- oe_runmake install ROOT=${D} PACKAGE_ARCH=${PACKAGE_ARCH}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D} PACKAGE_ARCH=${PACKAGE_ARCH}
install -d ${D}/system/etc/tele/
- install -m 0644 ${S}resource/apns-conf.xml ${D}/system/etc/tele/
- install -m 0644 ${S}resource/apns-full-conf.xml ${D}/system/etc/tele/
- install -m 0644 ${S}resource/apns-conf-pct*.xml ${D}/system/etc/tele/
+ install -m 0644 ${SRC-DIR}/resource/apns-conf.xml ${D}/system/etc/tele/
+ install -m 0644 ${SRC-DIR}/resource/apns-full-conf.xml ${D}/system/etc/tele/
+ install -m 0644 ${SRC-DIR}/resource/apns-conf-pct*.xml ${D}/system/etc/tele/
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-call/liblynq-call.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-call/liblynq-call.bb
index 9ad8269..4ca46a0 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-call/liblynq-call.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-call/liblynq-call.bb
@@ -1,12 +1,17 @@
-inherit externalsrc package
+#inherit externalsrc package
DESCRIPTION = "lynq call"
-LICENSE = "MobileTekProprietary"
+LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
DEPENDS += "libpal gstreamer1.0 glib-2.0 libapn liblynq-log libvendor-ril liblynq-shm libbinder"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-call"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-call \
+ "
+SRC-DIR = "${S}/../liblynq-call"
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -30,20 +35,20 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install() {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}
- cp -af ${S}/include/libcall/ ${D}${includedir}/libcall
+ cp -af ${SRC-DIR}/include/libcall/ ${D}${includedir}/libcall
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-data/liblynq-data.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-data/liblynq-data.bb
index 7041261..7a4ac26 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-data/liblynq-data.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-data/liblynq-data.bb
@@ -1,12 +1,17 @@
-inherit externalsrc package
+#inherit externalsrc package
-DESCRIPTION = "lynq call"
-LICENSE = "MobileTekProprietary"
+DESCRIPTION = "lynq data"
+LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
DEPENDS += "libpal liblynq-log libvendor-ril liblynq-shm"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-data"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-data \
+ "
+SRC-DIR = "${S}/../liblynq-data"
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -32,20 +37,20 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install() {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}
- cp -af ${S}/include/libdata/ ${D}${includedir}/libdata
+ cp -af ${SRC-DIR}/include/libdata/ ${D}${includedir}/libdata
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-log/liblynq-log.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-log/liblynq-log.bb
index 4ff706e..cf8b12d 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-log/liblynq-log.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-log/liblynq-log.bb
@@ -1,4 +1,4 @@
-inherit externalsrc package
+#inherit externalsrc package
DESCRIPTION = "lynq-log.so demo"
SECTION = "base"
@@ -7,9 +7,12 @@
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
#DEPENDS += "platform-libs libpal nandapi liblynq-uci"
DEPENDS += "liblynq-uci libbinder"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-log"
-
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-log \
+ "
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -39,24 +42,25 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
+ echo "TOPDIR:${TOPDIR}"
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${S}/../liblynq-log OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${S}/../liblynq-log OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${S}/../liblynq-log OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${S}/../liblynq-log OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${S}/../liblynq-log ROOT=${D}
echo "warren-D:${D}"
echo "warren-S:${S}"
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}/liblog
- cp -af ${S}/include/liblog ${D}${includedir}/liblog
+ cp -af ${S}/../liblynq-log/include/liblog ${D}${includedir}/liblog
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-network/liblynq-network.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-network/liblynq-network.bb
index c7f55bc..055a0c9 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-network/liblynq-network.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-network/liblynq-network.bb
@@ -1,12 +1,17 @@
-inherit externalsrc package
+#inherit externalsrc package
-DESCRIPTION = "liblynq-network.so"
-LICENSE = "MobileTekProprietary"
+DESCRIPTION = "liblynq-network "
+LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
DEPENDS += "libpal liblynq-log libvendor-ril liblynq-shm"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-network/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-network \
+ "
+SRC-DIR = "${S}/../liblynq-network"
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -34,22 +39,22 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}/lynq_network
- cp -arf ${S}/include/lynq_network ${D}${includedir}/lynq_network
+ cp -arf ${SRC-DIR}/include/lynq_network ${D}${includedir}/lynq_network
install -d ${D}/data/ril/network
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-data/liblynq-qser-data.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-data/liblynq-qser-data.bb
new file mode 100644
index 0000000..bc83716
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-data/liblynq-qser-data.bb
@@ -0,0 +1,57 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-qser-data"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS += "liblynq-log liblynq-data libxml2"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-data/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-qser-data\
+ "
+
+SRC-DIR = "${S}/../liblynq-qser-data"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+
+EXTRA_OEMAKE = "'TARGET_PLATFORM = ${TARGET_PLATFORM}'"
+
+FILES_${PN} = "${base_libdir}/*.so "
+
+FILES_${PN}-dev = "/test \
+ ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+ ${base_libdir}/.debug \
+ ${base_sbindir}/.debug"
+FILES_${PN} += "${bindir}/ /data"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+}
+
+do_install () {
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
+
+ if [ -d "${WORKONSRC}" ] ; then
+ install -d ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+ fi
+ install -d ${D}/data/
+ cp -R ${WORKONSRC}/lynq_qser_data_apn.xml ${D}/data/
+}
+
+addtask bachclean
+do_bachclean () {
+ oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-sim/liblynq-qser-sim.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-sim/liblynq-qser-sim.bb
new file mode 100755
index 0000000..f4c89f4
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-sim/liblynq-qser-sim.bb
@@ -0,0 +1,53 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-qser-sms"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS += "liblynq-log liblynq-sim"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-sim/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-qser-sim \
+ "
+
+SRC-DIR = "${S}/../liblynq-qser-sim"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+#Parameters passed to do_compile()
+
+FILES_${PN} = "${base_libdir}/*.so "
+
+FILES_${PN}-dev = "/test \
+ ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+ ${base_libdir}/.debug \
+ ${base_sbindir}/.debug"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+}
+
+do_install () {
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
+
+ if [ -d "${WORKONSRC}" ] ; then
+ install -d ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+ fi
+}
+
+addtask bachclean
+do_bachclean () {
+ oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-sms/liblynq-qser-sms.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-sms/liblynq-qser-sms.bb
new file mode 100755
index 0000000..525d68c
--- /dev/null
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-sms/liblynq-qser-sms.bb
@@ -0,0 +1,53 @@
+#inherit externalsrc package
+
+DESCRIPTION = "liblynq-qser-sms"
+LICENSE = "CLOSED"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+DEPENDS += "liblynq-log liblynq-sms"
+#inherit workonsrc
+WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-sms/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-qser-sms\
+ "
+
+SRC-DIR = "${S}/../liblynq-qser-sms"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
+BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
+#Parameters passed to do_compile()
+
+FILES_${PN} = "${base_libdir}/*.so "
+
+FILES_${PN}-dev = "/test \
+ ${includedir}"
+
+FILES_${PN}-doc = "/doc"
+
+FILES_${PN}-dbg ="${base_bindir}/.debug \
+ ${base_libdir}/.debug \
+ ${base_sbindir}/.debug"
+
+INSANE_SKIP_${PN} += "already-stripped"
+INSANE_SKIP_${PN} += "installed-vs-shipped"
+
+
+#INHIBIT_PACKAGE_STRIP = "1"
+do_compile () {
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+}
+
+do_install () {
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
+
+ if [ -d "${WORKONSRC}" ] ; then
+ install -d ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/ ${D}${includedir}/
+ fi
+}
+
+addtask bachclean
+do_bachclean () {
+ oe_runmake clean
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-voice/liblynq-qser-voice.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-voice/liblynq-qser-voice.bb
index 1265fc0..bf91a75 100644
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-voice/liblynq-qser-voice.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-qser-voice/liblynq-qser-voice.bb
@@ -1,12 +1,17 @@
-inherit externalsrc package
+#inherit externalsrc package
DESCRIPTION = "liblynq-qser-voice"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
DEPENDS += "liblynq-log liblynq-call"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-qser-voice/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-qser-voice\
+ "
+SRC-DIR = "${S}/../liblynq-qser-voice"
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -28,19 +33,19 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}/
- cp -af ${S}include/ ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/ ${D}${includedir}/
fi
}
addtask bachclean
do_bachclean () {
oe_runmake clean
-}
\ No newline at end of file
+}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-shm/liblynq-shm.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-shm/liblynq-shm.bb
index 57f2be5..8340c76 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-shm/liblynq-shm.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-shm/liblynq-shm.bb
@@ -1,12 +1,18 @@
-inherit externalsrc package
-
+#inherit externalsrc package
+LICENSE = "zte"
DESCRIPTION = "liblynq-shm.so"
-LICENSE = "MobileTekProprietary"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+#LICENSE = "MobileTekProprietary"
+#LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/zte;md5=c075689d1d1e06d4ab5bbe53623a6808"
DEPENDS += "liblynq-log"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-shm/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-shm \
+ "
+SRC-DIR = "${S}/../liblynq-shm"
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -30,22 +36,22 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}/lynq_shm
- cp -arf ${S}/include/* ${D}${includedir}/lynq_shm/
+ cp -arf ${SRC-DIR}/include/* ${D}${includedir}/lynq_shm/
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sim/liblynq-sim.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sim/liblynq-sim.bb
index 245b5f8..59701c7 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sim/liblynq-sim.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sim/liblynq-sim.bb
@@ -1,11 +1,17 @@
-inherit externalsrc package
+#inherit externalsrc package
DESCRIPTION = "lynq sim"
-LICENSE = "MobileTekProprietary"
+LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
DEPENDS += "libpal gstreamer1.0 glib-2.0 libapn liblynq-log libvendor-ril liblynq-shm libbinder"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-sim/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-sim \
+ "
+
+SRC-DIR = "${S}/../liblynq-sim"
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
@@ -35,22 +41,22 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}/
- cp -af ${S}/include/ ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/ ${D}${includedir}/
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sms/liblynq-sms.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sms/liblynq-sms.bb
index 2161303..c80d7d7 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sms/liblynq-sms.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-sms/liblynq-sms.bb
@@ -1,11 +1,18 @@
-inherit externalsrc package
+#inherit externalsrc package
-DESCRIPTION = "liblynq-uci.so demo"
+DESCRIPTION = "liblynq sms"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
DEPENDS += "libpal liblynq-log libvendor-ril liblynq-shm"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-sms/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-sms\
+ "
+
+SRC-DIR = "${S}/../liblynq-sms"
+
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
@@ -33,22 +40,22 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mfpu=neon-vfpv4 -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
if [ -d "${WORKONSRC}" ] ; then
install -d ${D}${includedir}/
- cp -af ${S}/include/libsms ${D}${includedir}/
+ cp -af ${SRC-DIR}/include/libsms ${D}${includedir}/
fi
}
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-uci/liblynq-uci.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-uci/liblynq-uci.bb
index b68663b..ff57b60 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-uci/liblynq-uci.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-uci/liblynq-uci.bb
@@ -1,13 +1,17 @@
-inherit externalsrc package
+#inherit externalsrc package
DESCRIPTION = "liblynq-uci.so demo"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
#DEPENDS += "platform-libs-common uci"
DEPENDS += "uci"
-inherit workonsrc
-WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-uci/"
+#inherit workonsrc
+#WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-uci/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://liblynq-uci \
+ "
TARGET_CC_ARCH += "${LDFLAGS}"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -39,26 +43,26 @@
do_compile () {
echo "TOPDIR:${TOPDIR}"
if [ "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${S}/../liblynq-uci OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${S}/../liblynq-uci OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE"
elif [ "${PACKAGE_ARCH}" = "cortexa53hf-neon-fp-armv8" ]; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
+ oe_runmake all -C ${S}/../liblynq-uci OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -mhard-float -Wl,--hash-style=gnu -DTELEPHONYWARE -mhard-float -mfpu=neon-fp-armv8 -mfloat-abi=hard -mcpu=cortex-a53 -mtune=cortex-a53"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
+ oe_runmake all -C ${S}/../liblynq-uci OFLAGS="--sysroot=${STAGING_DIR_HOST} -Os -Wl,--hash-style=gnu -DTELEPHONYWARE"
fi
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${S}/../liblynq-uci ROOT=${D}
- if [ -d "${WORKONSRC}" ] ; then
+
install -d ${D}${includedir}/
- cp -af ${S}/include/ ${D}${includedir}/
+ cp -af ${S}/../liblynq-uci/include/ ${D}${includedir}/
install -d ${D}/etc/config
- install -m 0644 ${S}/lynq_uci.config ${D}/etc/config/lynq_uci
- install -m 0644 ${S}/lynq_uci_ro.config ${D}/etc/config/lynq_uci_ro
- fi
+ install -m 0644 ${S}/../liblynq-uci/lynq_uci.config ${D}/etc/config/lynq_uci
+ install -m 0644 ${S}/../liblynq-uci/lynq_uci_ro.config ${D}/etc/config/lynq_uci_ro
+
}
addtask bachclean
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libpal/libpal_1.0.0.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libpal/libpal_1.0.0.bb
index 44dd7ec..4cfd798 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libpal/libpal_1.0.0.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libpal/libpal_1.0.0.bb
@@ -2,10 +2,16 @@
DESCRIPTION = "LIBPAL"
SECTION = "base"
LICENSE = "MediaTekProprietary"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
+LIC_FILES_CHKSUM = "file://../libpal/LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
DEPENDS += "libbinder"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/libpal/"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
+SRC_URI = " \
+ file://libpal \
+ "
+
+SRC-DIR = "${S}/../libpal"
BB_INCLUDE_ADD = "--sysroot=${STAGING_DIR_HOST}"
BB_LDFLAGS_ADD = "--sysroot=${STAGING_DIR_HOST} -Wl,--hash-style=gnu"
@@ -43,14 +49,14 @@
do_compile () {
unset LDFLAGS
- oe_runmake all ROOT=${STAGING_DIR_HOST}
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST}
}
do_install () {
- oe_runmake install ROOT=${D}
+ oe_runmake install -C ${SRC-DIR} ROOT=${D}
install -d ${D}${includedir}/pal
- cp -af ${S}/include/* ${D}${includedir}/pal
+ cp -af ${SRC-DIR}/include/* ${D}${includedir}/pal
}
addtask bachclean
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libvendor-ril/libvendor-ril.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libvendor-ril/libvendor-ril.bb
index b706a81..254fd64 100644
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libvendor-ril/libvendor-ril.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/libvendor-ril/libvendor-ril.bb
@@ -4,7 +4,7 @@
#LICENSE = "MobileTekProprietary"
LICENSE = "CLOSED"
#LIC_FILES_CHKSUM = "file://LICENSE;md5=e1696b147d49d491bcb4da1a57173fff"
-DEPENDS = "libreference-ril"
+DEPENDS = "libreference-ril libril"
INSANE_SKIP_${PN} = "ldflags"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-ril-service/lynq-ril-service.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-ril-service/lynq-ril-service.bb
index 24ce5bc..c05ec76 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-ril-service/lynq-ril-service.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/lynq-ril-service/lynq-ril-service.bb
@@ -1,12 +1,17 @@
#inherit externalsrc package
-inherit externalsrc package systemd
+#inherit externalsrc package systemd
DESCRIPTION = "lynq ril service"
-LICENSE = "MobileTekProprietary"
+LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
DEPENDS += "${@bb.utils.contains('TARGET_PLATFORM', 'mt2735', 'audio-mixer-ctrl streamer1.0', '', d)} libapn libpal libvendor-ril libbinder glib-2.0 dbus liblynq-log liblynq-uci liblynq-shm"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/framework/lynq-ril-service/src"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/framework/:"
+SRC_URI = " \
+ file://lynq-ril-service \
+ "
+SRC-DIR = "${S}/../lynq-ril-service/src"
TARGET_CC_ARCH += "${LDFLAGS}"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "lynq_ril_service.service"
@@ -25,9 +30,9 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
fi
}
@@ -39,13 +44,13 @@
echo "lynq-ril-service ${D}${bindir}"
echo "lynq-ril-service ${S}/lynq-ril-service"
install -d ${D}${bindir}/
- install -m 0755 ${S}lynq-ril-service ${D}${bindir}/
+ install -m 0755 ${SRC-DIR}/lynq-ril-service ${D}${bindir}/
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
install -d ${D}${systemd_unitdir}/system/
install -m 0644 ${B}/lynq_ril_service.service ${D}${systemd_unitdir}/system
else
install -d ${D}${sysconfdir}/init.d
- install -m 0755 ${S}lynq-ril-service.sh ${D}${sysconfdir}/init.d/lynq-ril-service.sh
+ install -m 0755 ${SRC-DIR}/lynq-ril-service.sh ${D}${sysconfdir}/init.d/lynq-ril-service.sh
install -d ${D}${sysconfdir}/rcS.d
ln -s ../init.d/lynq-ril-service.sh ${D}${sysconfdir}/rcS.d/S82lynq-ril-service
fi
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb
index 3db44aa..dd99885 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/mobiletek-tester-rdit/mobiletek-tester-rdit.bb
@@ -1,13 +1,18 @@
#inherit externalsrc package
-inherit externalsrc package systemd
+#inherit externalsrc package systemd
DESCRIPTION = "Mobiletek_Tester_RDIT"
-LICENSE = "MobileTekProprietary"
+LICENSE = "CLOSED"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b1e07e8d88e26263e71d3a9e2aa9a2ff"
DEPENDS += "liblynq-call liblynq-sms liblynq-network liblynq-sim liblynq-data"
-inherit workonsrc
+#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/packages/apps/Mobiletek_Tester_RDIT"
+FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/packages/apps/:"
+SRC_URI = " \
+ file://Mobiletek_Tester_RDIT \
+ "
+SRC-DIR = "${S}/../Mobiletek_Tester_RDIT"
TARGET_CC_ARCH += "${LDFLAGS}"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "lynq_ril_service.service"
@@ -25,9 +30,9 @@
#INHIBIT_PACKAGE_STRIP = "1"
do_compile () {
if test "${PACKAGE_ARCH}" = "cortexa7hf-vfp-vfpv4-neon" || test "${PACKAGE_ARCH}" = "cortexa7hf-neon-vfpv4"; then
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST} -mhard-float"
else
- oe_runmake all ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
+ oe_runmake all -C ${SRC-DIR} ROOT=${STAGING_DIR_HOST} OFLAGS="--sysroot=${STAGING_DIR_HOST}"
fi
}
@@ -39,6 +44,6 @@
echo "lynq-ril-service ${D}${bindir}"
echo "lynq-ril-service ${S}/Mobiletek_Tester_RDIT"
install -d ${D}${bindir}/
- install -m 0755 ${S}Mobiletek-Tester-RDIT ${D}${bindir}/
- install -m 0755 ${S}socket-tool ${D}${bindir}/
+ install -m 0755 ${SRC-DIR}/Mobiletek-Tester-RDIT ${D}${bindir}/
+ install -m 0755 ${SRC-DIR}/socket-tool ${D}${bindir}/
}
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libreference-ril/libreference-ril.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libreference-ril/libreference-ril.bb
index c34e2d8..f3b44ea 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libreference-ril/libreference-ril.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libreference-ril/libreference-ril.bb
@@ -29,7 +29,7 @@
install -m 0755 ${S}/ril/reference-ril/libreference-ril.so ${D}${libdir}/
- install -m 0644 ${S}/ril/include/telephony/*.h ${D}/usr/include/telephony/
+ #install -m 0644 ${S}/ril/include/telephony/*.h ${D}/usr/include/telephony/
#install elfs
install -d ${ELFS-PATH}/
@@ -46,4 +46,4 @@
FILES_${PN}-dbg += "${libdir}/.debug"
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} = "dev-so"
-RDEPENDS_${PN} = "libatchn libsoftap libnvram libsofttimer libatutils libtinyalsa libvoice libmedia"
\ No newline at end of file
+RDEPENDS_${PN} = "libatchn libsoftap libnvram libsofttimer libatutils libtinyalsa libvoice libmedia"
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libril/libril.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libril/libril.bb
index 18d4cfb..5c7991f 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libril/libril.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libril/libril.bb
@@ -28,7 +28,7 @@
install -d ${D}/usr/include/telephony
install -d ${D}/usr/include/libril
- install -m 0755 ${S}/ril/reference-ril/libreference-ril.so ${D}${libdir}/
+ #install -m 0755 ${S}/ril/reference-ril/libreference-ril.so ${D}${libdir}/
install -m 0755 ${S}/ril/libril/libril.so ${D}${libdir}/
install -m 0755 ${S}/ril/librilutils/librilutils.so ${D}${libdir}/
install -m 0755 ${S}/ril/nanopb-c/libprotobuf-c-nano-enable_malloc.so ${D}${libdir}/
diff --git a/cap/zx297520v3/sources/meta-zxic/recipes-app/libsqlite/libsqlite.bb b/cap/zx297520v3/sources/meta-zxic/recipes-app/libsqlite/libsqlite.bb
index 529d0e1..914eb88 100755
--- a/cap/zx297520v3/sources/meta-zxic/recipes-app/libsqlite/libsqlite.bb
+++ b/cap/zx297520v3/sources/meta-zxic/recipes-app/libsqlite/libsqlite.bb
@@ -26,7 +26,7 @@
install -m 0755 ${S}/libsqlite/libsqlite.so ${D}${libdir}/
install -m 0755 ${S}/libsqlite/libsqlite.a ${D}${libdir}/
- install -m 0644 ${S}/libsqlite/sqlite3.h ${D}/usr/include
+ #install -m 0644 ${S}/libsqlite/sqlite3.h ${D}/usr/include
install -d ${ELFS-PATH}/
install -m 0755 ${S}/libsqlite/libsqlite.so ${ELFS-PATH}/
diff --git a/cap/zx297520v3/sources/poky/meta-poky/conf/local.conf.sample b/cap/zx297520v3/sources/poky/meta-poky/conf/local.conf.sample
index 2ad664c..c28089c 100644
--- a/cap/zx297520v3/sources/poky/meta-poky/conf/local.conf.sample
+++ b/cap/zx297520v3/sources/poky/meta-poky/conf/local.conf.sample
@@ -266,4 +266,4 @@
# this doesn't mean anything to you.
CONF_VERSION = "1"
#add lynq require
-require ${BSPDIR}/sources/meta-zxic-custom/conf/lynq_base.conf
+#require ${BSPDIR}/sources/meta-zxic-custom/conf/lynq_base.conf
diff --git a/cap/zx297520v3/sources/poky/meta/classes/reproducible_build.bbclass b/cap/zx297520v3/sources/poky/meta/classes/reproducible_build.bbclass
index 2b402b9..ec86255 100644
--- a/cap/zx297520v3/sources/poky/meta/classes/reproducible_build.bbclass
+++ b/cap/zx297520v3/sources/poky/meta/classes/reproducible_build.bbclass
@@ -64,6 +64,7 @@
SSTATETASKS += "do_deploy_source_date_epoch"
do_deploy_source_date_epoch () {
+
mkdir -p ${SDE_DEPLOYDIR}
if [ -e ${SDE_FILE} ]; then
echo "Deploying SDE from ${SDE_FILE} -> ${SDE_DEPLOYDIR}."
diff --git a/cap/zx297520v3/sources/poky/meta/files/toolchain-shar-extract.sh b/cap/zx297520v3/sources/poky/meta/files/toolchain-shar-extract.sh
index 4386b98..eb0b8a3 100644
--- a/cap/zx297520v3/sources/poky/meta/files/toolchain-shar-extract.sh
+++ b/cap/zx297520v3/sources/poky/meta/files/toolchain-shar-extract.sh
@@ -286,6 +286,9 @@
$SUDO_EXEC /bin/sh $post_relocate "$target_sdk_dir" "@SDKPATH@"
$SUDO_EXEC rm -f $post_relocate
fi
+if [ ! -L $target_sdk_dir/sources ]; then
+ cd $target_sdk_dir && ln -s layers sources
+fi
echo "SDK has been successfully set up and is ready to be used."
echo "Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g."
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/SmsMessageConverter.h b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/SmsMessageConverter.h
index cf70a9a..12fbc18 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/SmsMessageConverter.h
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/SmsMessageConverter.h
@@ -38,7 +38,7 @@
#include <memory>
#include "SmsMessage.h"
-#include "ril_cdma_sms.h"
+#include <telephony/ril_cdma_sms.h>
class SmsMessageConverter {
public:
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/ril_cdma_sms_local.h b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/ril_cdma_sms_local.h
new file mode 100755
index 0000000..a147d21
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/sms/cdma/ril_cdma_sms_local.h
@@ -0,0 +1,802 @@
+/*
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * ISSUES:
+ *
+ */
+
+/**
+ * TODO
+ *
+ *
+ */
+
+#ifndef ANDROID_RIL_CDMA_SMS_H
+#define ANDROID_RIL_CDMA_SMS_H 1
+
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Used by RIL_REQUEST_CDMA_SEND_SMS and RIL_UNSOL_RESPONSE_CDMA_NEW_SMS */
+
+#define RIL_CDMA_SMS_ADDRESS_MAX 36
+#define RIL_CDMA_SMS_SUBADDRESS_MAX 36
+#define RIL_CDMA_SMS_BEARER_DATA_MAX 255
+
+typedef enum {
+ RIL_CDMA_SMS_DIGIT_MODE_4_BIT = 0, /* DTMF digits */
+ RIL_CDMA_SMS_DIGIT_MODE_8_BIT = 1, RIL_CDMA_SMS_DIGIT_MODE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_DigitMode;
+
+typedef enum {
+ RIL_CDMA_SMS_NUMBER_MODE_NOT_DATA_NETWORK = 0,
+ RIL_CDMA_SMS_NUMBER_MODE_DATA_NETWORK = 1,
+ RIL_CDMA_SMS_NUMBER_MODE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_NumberMode;
+
+typedef enum {
+ RIL_CDMA_SMS_NUMBER_TYPE_UNKNOWN = 0,
+ RIL_CDMA_SMS_NUMBER_TYPE_INTERNATIONAL_OR_DATA_IP = 1,
+ /* INTERNATIONAL is used when number mode is not data network address.
+ * DATA_IP is used when the number mode is data network address
+ */
+ RIL_CDMA_SMS_NUMBER_TYPE_NATIONAL_OR_INTERNET_MAIL = 2,
+ /* NATIONAL is used when the number mode is not data network address.
+ * INTERNET_MAIL is used when the number mode is data network address.
+ * For INTERNET_MAIL, in the address data "digits", each byte contains
+ * an ASCII character. Examples are "x@y.com,a@b.com - ref TIA/EIA-637A 3.4.3.3
+ */
+ RIL_CDMA_SMS_NUMBER_TYPE_NETWORK = 3,
+ RIL_CDMA_SMS_NUMBER_TYPE_SUBSCRIBER = 4,
+ RIL_CDMA_SMS_NUMBER_TYPE_ALPHANUMERIC = 5,
+ /* GSM SMS: address value is GSM 7-bit chars */
+ RIL_CDMA_SMS_NUMBER_TYPE_ABBREVIATED = 6,
+ RIL_CDMA_SMS_NUMBER_TYPE_RESERVED_7 = 7,
+ RIL_CDMA_SMS_NUMBER_TYPE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_NumberType;
+
+typedef enum {
+ RIL_CDMA_SMS_NUMBER_PLAN_UNKNOWN = 0,
+ RIL_CDMA_SMS_NUMBER_PLAN_TELEPHONY = 1, /* CCITT E.164 and E.163, including ISDN plan */
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_2 = 2,
+ RIL_CDMA_SMS_NUMBER_PLAN_DATA = 3, /* CCITT X.121 */
+ RIL_CDMA_SMS_NUMBER_PLAN_TELEX = 4, /* CCITT F.69 */
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_5 = 5,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_6 = 6,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_7 = 7,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_8 = 8,
+ RIL_CDMA_SMS_NUMBER_PLAN_PRIVATE = 9,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_10 = 10,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_11 = 11,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_12 = 12,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_13 = 13,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_14 = 14,
+ RIL_CDMA_SMS_NUMBER_PLAN_RESERVED_15 = 15,
+ RIL_CDMA_SMS_NUMBER_PLAN_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_NumberPlan;
+
+typedef struct {
+ RIL_CDMA_SMS_DigitMode digit_mode;
+ /* Indicates 4-bit or 8-bit */
+ RIL_CDMA_SMS_NumberMode number_mode;
+ /* Used only when digitMode is 8-bit */
+ RIL_CDMA_SMS_NumberType number_type;
+ /* Used only when digitMode is 8-bit.
+ * To specify an international address, use the following:
+ * digitMode = RIL_CDMA_SMS_DIGIT_MODE_8_BIT
+ * numberMode = RIL_CDMA_SMS_NOT_DATA_NETWORK
+ * numberType = RIL_CDMA_SMS_NUMBER_TYPE_INTERNATIONAL_OR_DATA_IP
+ * numberPlan = RIL_CDMA_SMS_NUMBER_PLAN_TELEPHONY
+ * numberOfDigits = number of digits
+ * digits = ASCII digits, e.g. '1', '2', '3'3, '4', and '5'
+ */
+ RIL_CDMA_SMS_NumberPlan number_plan;
+ /* Used only when digitMode is 8-bit */
+ unsigned char number_of_digits;
+ unsigned char digits[ RIL_CDMA_SMS_ADDRESS_MAX];
+ /* Each byte in this array represnts a 40bit or 8-bit digit of address data */
+} RIL_CDMA_SMS_Address;
+
+typedef enum {
+ RIL_CDMA_SMS_SUBADDRESS_TYPE_NSAP = 0, /* CCITT X.213 or ISO 8348 AD2 */
+ RIL_CDMA_SMS_SUBADDRESS_TYPE_USER_SPECIFIED = 1, /* e.g. X.25 */
+ RIL_CDMA_SMS_SUBADDRESS_TYPE_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_SubaddressType;
+
+typedef struct {
+ RIL_CDMA_SMS_SubaddressType subaddressType;
+ /* 1 means the last byte's lower 4 bits should be ignored */
+ unsigned char odd;
+ unsigned char number_of_digits;
+ /* Each byte respresents a 8-bit digit of subaddress data */
+ unsigned char digits[ RIL_CDMA_SMS_SUBADDRESS_MAX];
+} RIL_CDMA_SMS_Subaddress;
+
+typedef struct {
+ int uTeleserviceID;
+ unsigned char bIsServicePresent;
+ int uServicecategory;
+ RIL_CDMA_SMS_Address sAddress;
+ RIL_CDMA_SMS_Subaddress sSubAddress;
+ int uBearerDataLen;
+ unsigned char aBearerData[ RIL_CDMA_SMS_BEARER_DATA_MAX];
+} RIL_CDMA_SMS_Message;
+
+/* Used by RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE */
+
+typedef enum {
+ RIL_CDMA_SMS_NO_ERROR = 0,
+ RIL_CDMA_SMS_ERROR = 1,
+ RIL_CDMA_SMS_ERROR_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_ErrorClass;
+
+typedef struct {
+ RIL_CDMA_SMS_ErrorClass uErrorClass;
+ int uSMSCauseCode; /* As defined in N.S00005, 6.5.2.125.
+ Currently, only 35 (resource shortage) and
+ 39 (other terminal problem) are reported. */
+} RIL_CDMA_SMS_Ack;
+
+/* Used by RIL_REQUEST_CDMA_SMS_GET_BROADCAST_CONFIG and
+ RIL_REQUEST_CDMA_SMS_SET_BROADCAST_CONFIG */
+
+typedef struct {
+ int service_category;
+ int language;
+ unsigned char selected;
+} RIL_CDMA_BroadcastSmsConfigInfo;
+
+/* Used by RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM */
+
+typedef struct {
+ int status; /* Status of message. See TS 27.005 3.1, "<stat>": */
+ /* 0 = "REC UNREAD" */
+ /* 1 = "REC READ" */
+ /* 2 = "STO UNSENT" */
+ /* 3 = "STO SENT" */
+
+ RIL_CDMA_SMS_Message message;
+} RIL_CDMA_SMS_WriteArgs;
+
+/* Used by RIL_REQUEST_ENCODE_CDMA_SMS and RIL_REQUEST_DECODE_CDMA_SMS*/
+
+#define RIL_CDMA_SMS_UDH_MAX_SND_SIZE 128
+#define RIL_CDMA_SMS_UDH_EO_DATA_SEGMENT_MAX 131 /* 140 - 3 - 6 */
+#define RIL_CDMA_SMS_MAX_UD_HEADERS 7
+#define RIL_CDMA_SMS_USER_DATA_MAX 229
+#define RIL_CDMA_SMS_ADDRESS_MAX 36
+#define RIL_CDMA_SMS_UDH_LARGE_PIC_SIZE 128
+#define RIL_CDMA_SMS_UDH_SMALL_PIC_SIZE 32
+#define RIL_CDMA_SMS_UDH_VAR_PIC_SIZE 134
+#define RIL_CDMA_SMS_UDH_ANIM_NUM_BITMAPS 4
+#define RIL_CDMA_SMS_UDH_LARGE_BITMAP_SIZE 32
+#define RIL_CDMA_SMS_UDH_SMALL_BITMAP_SIZE 8
+#define RIL_CDMA_SMS_UDH_OTHER_SIZE 226
+#define RIL_CDMA_SMS_IP_ADDRESS_SIZE 4
+
+/* ------------------- */
+/* ---- User Data ---- */
+/* ------------------- */
+typedef enum {
+ RIL_CDMA_SMS_UDH_CONCAT_8 = 0x00,
+ RIL_CDMA_SMS_UDH_SPECIAL_SM,
+ /* 02 - 03 Reserved */
+ RIL_CDMA_SMS_UDH_PORT_8 = 0x04,
+ RIL_CDMA_SMS_UDH_PORT_16,
+ RIL_CDMA_SMS_UDH_SMSC_CONTROL,
+ RIL_CDMA_SMS_UDH_SOURCE,
+ RIL_CDMA_SMS_UDH_CONCAT_16,
+ RIL_CDMA_SMS_UDH_WCMP,
+ RIL_CDMA_SMS_UDH_TEXT_FORMATING,
+ RIL_CDMA_SMS_UDH_PRE_DEF_SOUND,
+ RIL_CDMA_SMS_UDH_USER_DEF_SOUND,
+ RIL_CDMA_SMS_UDH_PRE_DEF_ANIM,
+ RIL_CDMA_SMS_UDH_LARGE_ANIM,
+ RIL_CDMA_SMS_UDH_SMALL_ANIM,
+ RIL_CDMA_SMS_UDH_LARGE_PICTURE,
+ RIL_CDMA_SMS_UDH_SMALL_PICTURE,
+ RIL_CDMA_SMS_UDH_VAR_PICTURE,
+
+ RIL_CDMA_SMS_UDH_USER_PROMPT = 0x13,
+ RIL_CDMA_SMS_UDH_EXTENDED_OBJECT = 0x14,
+
+ /* 15 - 1F Reserved for future EMS */
+
+ RIL_CDMA_SMS_UDH_RFC822 = 0x20,
+
+ /* 21 - 6F Reserved for future use */
+ /* 70 - 7f Reserved for (U)SIM Toolkit Security Headers */
+ /* 80 - 9F SME to SME specific use */
+ /* A0 - BF Reserved for future use */
+ /* C0 - DF SC specific use */
+ /* E0 - FF Reserved for future use */
+
+ RIL_CDMA_SMS_UDH_OTHER = 0xFFFF, /* For unsupported or proprietary headers */
+ RIL_CDMA_SMS_UDH_ID_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+
+} RIL_CDMA_SMS_UdhId;
+
+typedef struct {
+ /*indicates the reference number for a particular concatenated short message. */
+ /*it is constant for every short message which makes up a particular concatenated short message*/
+ unsigned char msg_ref;
+
+ /*indicates the total number of short messages within the concatenated short message.
+ The value shall start at 1 and remain constant for every
+ short message which makes up the concatenated short message.
+ if it is 0 then the receiving entity shall ignore the whole Information Element*/
+ unsigned char total_sm;
+
+ /*
+ * it indicates the sequence number of a particular short message within the concatenated short
+ * message. The value shall start at 1 and increment by one for every short message sent
+ * within the concatenated short message. If the value is zero or the value is
+ * greater than the value in octet 2 then the receiving
+ * entity shall ignore the whole Information Element.
+ */
+ unsigned char seq_num;
+} RIL_CDMA_SMS_UdhConcat8;
+
+/* GW message waiting actions
+ */
+typedef enum {
+ RIL_CDMA_SMS_GW_MSG_WAITING_NONE,
+ RIL_CDMA_SMS_GW_MSG_WAITING_DISCARD,
+ RIL_CDMA_SMS_GW_MSG_WAITING_STORE,
+ RIL_CDMA_SMS_GW_MSG_WAITING_NONE_1111,
+ RIL_CDMA_SMS_GW_MSG_WAITING_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_GWMsgWaiting;
+
+/* GW message waiting types
+ */
+typedef enum {
+ RIL_CDMA_SMS_GW_MSG_WAITING_VOICEMAIL,
+ RIL_CDMA_SMS_GW_MSG_WAITING_FAX,
+ RIL_CDMA_SMS_GW_MSG_WAITING_EMAIL,
+ RIL_CDMA_SMS_GW_MSG_WAITING_OTHER,
+ RIL_CDMA_SMS_GW_MSG_WAITING_KIND_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_GWMsgWaitingKind;
+
+typedef struct {
+ RIL_CDMA_SMS_GWMsgWaiting msg_waiting;
+ RIL_CDMA_SMS_GWMsgWaitingKind msg_waiting_kind;
+
+ /*it indicates the number of messages of the type specified in Octet 1 waiting.*/
+ unsigned char message_count;
+} RIL_CDMA_SMS_UdhSpecialSM;
+
+typedef struct {
+ unsigned char dest_port;
+ unsigned char orig_port;
+} RIL_CDMA_SMS_UdhWap8;
+
+typedef struct {
+ unsigned short dest_port;
+ unsigned short orig_port;
+} RIL_CDMA_SMS_UdhWap16;
+
+typedef struct {
+ unsigned short msg_ref;
+ unsigned char total_sm;
+ unsigned char seq_num;
+
+} RIL_CDMA_SMS_UdhConcat16;
+
+typedef enum {
+ RIL_CDMA_SMS_UDH_LEFT_ALIGNMENT = 0,
+ RIL_CDMA_SMS_UDH_CENTER_ALIGNMENT,
+ RIL_CDMA_SMS_UDH_RIGHT_ALIGNMENT,
+ RIL_CDMA_SMS_UDH_DEFAULT_ALIGNMENT,
+ RIL_CDMA_SMS_UDH_MAX_ALIGNMENT,
+ RIL_CDMA_SMS_UDH_ALIGNMENT_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_UdhAlignment;
+
+typedef enum {
+ RIL_CDMA_SMS_UDH_FONT_NORMAL = 0,
+ RIL_CDMA_SMS_UDH_FONT_LARGE,
+ RIL_CDMA_SMS_UDH_FONT_SMALL,
+ RIL_CDMA_SMS_UDH_FONT_RESERVED,
+ RIL_CDMA_SMS_UDH_FONT_MAX,
+ RIL_CDMA_SMS_UDH_FONT_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_UdhFontSize;
+
+typedef enum {
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BLACK = 0x0,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_GREY = 0x1,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_RED = 0x2,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_YELLOW = 0x3,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_GREEN = 0x4,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_CYAN = 0x5,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_BLUE = 0x6,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_DARK_MAGENTA = 0x7,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_GREY = 0x8,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_WHITE = 0x9,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_RED = 0xA,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_YELLOW = 0xB,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_GREEN = 0xC,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_CYAN = 0xD,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_BLUE = 0xE,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_BRIGHT_MAGENTA = 0xF,
+ RIL_CDMA_SMS_UDH_TEXT_COLOR_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_UdhTextColor;
+
+typedef struct {
+ unsigned char start_position;
+ unsigned char text_formatting_length;
+ RIL_CDMA_SMS_UdhAlignment alignment_type; /*bit 0 and bit 1*/
+ RIL_CDMA_SMS_UdhFontSize font_size; /*bit 3 and bit 2*/
+ unsigned char style_bold; /*bit 4 */
+ unsigned char style_italic; /*bit 5 */
+ unsigned char style_underlined; /*bit 6 */
+ unsigned char style_strikethrough; /*bit 7 */
+
+ /* if FALSE, ignore the following color information */
+ unsigned char is_color_present;
+ RIL_CDMA_SMS_UdhTextColor text_color_foreground;
+ RIL_CDMA_SMS_UdhTextColor text_color_background;
+
+} RIL_CDMA_SMS_UdhTextFormating;
+
+/* Predefined sound
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char snd_number;
+} RIL_CDMA_SMS_UdhPreDefSound;
+
+/* User Defined sound
+ */
+typedef struct {
+ unsigned char data_length;
+ unsigned char position;
+ unsigned char user_def_sound[RIL_CDMA_SMS_UDH_MAX_SND_SIZE];
+} RIL_CDMA_SMS_UdhUserDefSound;
+
+/* Large picture
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char data[RIL_CDMA_SMS_UDH_LARGE_PIC_SIZE];
+} RIL_CDMA_SMS_UdhLargePictureData;
+
+/* Small picture
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char data[RIL_CDMA_SMS_UDH_SMALL_PIC_SIZE];
+} RIL_CDMA_SMS_UdhSmallPictureData;
+
+/* Variable length picture
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char width; /* Number of pixels - Should be a mutliple of 8 */
+ unsigned char height;
+ unsigned char data[RIL_CDMA_SMS_UDH_VAR_PIC_SIZE];
+} RIL_CDMA_SMS_UdhVarPicture;
+
+/* Predefined animation
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char animation_number;
+} RIL_CDMA_SMS_UdhPreDefAnim;
+
+/* Large animation
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char data[RIL_CDMA_SMS_UDH_ANIM_NUM_BITMAPS][RIL_CDMA_SMS_UDH_LARGE_BITMAP_SIZE];
+} RIL_CDMA_SMS_UdhLargeAnim;
+
+/* Small animation
+ */
+typedef struct {
+ unsigned char position;
+ unsigned char data[RIL_CDMA_SMS_UDH_ANIM_NUM_BITMAPS][RIL_CDMA_SMS_UDH_SMALL_BITMAP_SIZE];
+} RIL_CDMA_SMS_UdhSmallAnim;
+
+/* User Prompt Indicator UDH
+ */
+typedef struct {
+ unsigned char number_of_objects;
+ /* Number of objects of the same kind that follow this header which will
+ ** be stitched together by the applications. For example, 5 small pictures
+ ** are to be stitched together horizontally, or 6 iMelody tones are to be
+ ** connected together with intermediate iMelody header and footer ignored.
+ ** Allowed objects to be stitched:
+ ** - Images (small, large, variable)
+ ** - User defined sounds
+ */
+} RIL_CDMA_SMS_UdhUserPrompt;
+
+typedef struct {
+ unsigned char length;
+
+ unsigned char data[RIL_CDMA_SMS_UDH_EO_DATA_SEGMENT_MAX];
+ /* RIL_CDMA_SMS_UDH_EO_VCARD: See http://www.imc.org/pdi/vcard-21.doc for payload */
+ /* RIL_CDMA_SMS_UDH_EO_VCALENDAR: See http://www.imc.org/pdi/vcal-10.doc */
+ /* Or: Unsupported/proprietary extended objects */
+
+} RIL_CDMA_SMS_UdhEoContent;
+
+/* Extended Object UDH
+ */
+/* Extended Object IDs/types
+ */
+typedef enum {
+ RIL_CDMA_SMS_UDH_EO_VCARD = 0x09,
+ RIL_CDMA_SMS_UDH_EO_VCALENDAR = 0x0A,
+ RIL_CDMA_SMS_UDH_EO_MAX32 = 0x10000000 /* Force constant ENUM size in structures */
+} RIL_CDMA_SMS_UdhEoId;
+
+typedef struct {
+ /* Extended objects are to be used together with 16-bit concatenation
+ ** UDH. The max number of segments supported for E.O. is 8 at least.
+ */
+ RIL_CDMA_SMS_UdhEoContent content;
+
+ unsigned char first_segment;
+ /* The following fields are only present in the first segment of a
+ ** concatenated SMS message.
+ */
+ unsigned char reference;
+ /* Identify those extended object segments which should be linked together
+ */
+ unsigned short length;
+ /* Length of the whole extended object data
+ */
+ unsigned char control;
+ RIL_CDMA_SMS_UdhEoId type;
+ unsigned short position;
+ /* Absolute position of the E.O. in the whole text after concatenation,
+ ** starting from 1.
+ */
+} RIL_CDMA_SMS_UdhEo;
+
+typedef struct {
+ RIL_CDMA_SMS_UdhId header_id;
+ unsigned char header_length;
+ unsigned char data[RIL_CDMA_SMS_UDH_OTHER_SIZE];
+} RIL_CDMA_SMS_UdhOther;
+
+typedef struct {
+ unsigned char header_length;
+} RIL_CDMA_SMS_UdhRfc822;
+
+typedef struct {
+ RIL_CDMA_SMS_UdhId header_id;
+
+ union {
+ RIL_CDMA_SMS_UdhConcat8 concat_8; // 00
+
+ RIL_CDMA_SMS_UdhSpecialSM special_sm; // 01
+ RIL_CDMA_SMS_UdhWap8 wap_8; // 04
+ RIL_CDMA_SMS_UdhWap16 wap_16; // 05
+ RIL_CDMA_SMS_UdhConcat16 concat_16; // 08
+ RIL_CDMA_SMS_UdhTextFormating text_formating; // 0a
+ RIL_CDMA_SMS_UdhPreDefSound pre_def_sound; // 0b
+ RIL_CDMA_SMS_UdhUserDefSound user_def_sound; // 0c
+ RIL_CDMA_SMS_UdhPreDefAnim pre_def_anim; // 0d
+ RIL_CDMA_SMS_UdhLargeAnim large_anim; // 0e
+ RIL_CDMA_SMS_UdhSmallAnim small_anim; // 0f
+ RIL_CDMA_SMS_UdhLargePictureData large_picture; // 10
+ RIL_CDMA_SMS_UdhSmallPictureData small_picture; // 11
+ RIL_CDMA_SMS_UdhVarPicture var_picture; // 12
+
+ RIL_CDMA_SMS_UdhUserPrompt user_prompt; // 13
+ RIL_CDMA_SMS_UdhEo eo; // 14
+
+ RIL_CDMA_SMS_UdhRfc822 rfc822; // 20
+ RIL_CDMA_SMS_UdhOther other;
+
+ } u;
+} RIL_CDMA_SMS_Udh;
+
+/* ----------------------------- */
+/* -- User data encoding type -- */
+/* ----------------------------- */
+typedef enum {
+ RIL_CDMA_SMS_ENCODING_OCTET = 0, /* 8-bit */
+ RIL_CDMA_SMS_ENCODING_IS91EP, /* varies */
+ RIL_CDMA_SMS_ENCODING_ASCII, /* 7-bit */
+ RIL_CDMA_SMS_ENCODING_IA5, /* 7-bit */
+ RIL_CDMA_SMS_ENCODING_UNICODE, /* 16-bit */
+ RIL_CDMA_SMS_ENCODING_SHIFT_JIS, /* 8 or 16-bit */
+ RIL_CDMA_SMS_ENCODING_KOREAN, /* 8 or 16-bit */
+ RIL_CDMA_SMS_ENCODING_LATIN_HEBREW, /* 8-bit */
+ RIL_CDMA_SMS_ENCODING_LATIN, /* 8-bit */
+ RIL_CDMA_SMS_ENCODING_GSM_7_BIT_DEFAULT, /* 7-bit */
+ RIL_CDMA_SMS_ENCODING_MAX32 = 0x10000000
+
+} RIL_CDMA_SMS_UserDataEncoding;
+
+/* ------------------------ */
+/* -- IS-91 EP data type -- */
+/* ------------------------ */
+typedef enum {
+ RIL_CDMA_SMS_IS91EP_VOICE_MAIL = 0x82,
+ RIL_CDMA_SMS_IS91EP_SHORT_MESSAGE_FULL = 0x83,
+ RIL_CDMA_SMS_IS91EP_CLI_ORDER = 0x84,
+ RIL_CDMA_SMS_IS91EP_SHORT_MESSAGE = 0x85,
+ RIL_CDMA_SMS_IS91EP_MAX32 = 0x10000000
+
+} RIL_CDMA_SMS_IS91EPType;
+
+typedef struct {
+ /* NOTE: If message_id.udh_present == TRUE:
+ ** 'num_headers' is the number of User Data Headers (UDHs),
+ ** and 'headers' include all those headers.
+ */
+ unsigned char num_headers;
+ RIL_CDMA_SMS_Udh headers[RIL_CDMA_SMS_MAX_UD_HEADERS];
+
+ RIL_CDMA_SMS_UserDataEncoding encoding;
+ RIL_CDMA_SMS_IS91EPType is91ep_type;
+
+ /*----------------------------------------------------------------------
+ 'data_len' indicates the valid number of bytes in the 'data' array.
+
+ 'padding_bits' (0-7) indicates how many bits in the last byte of 'data'
+ are invalid bits. This parameter is only used for Mobile-Originated
+ messages. There is no way for the API to tell how many padding bits
+ exist in the received message. Instead, the application can find out how
+ many padding bits exist in the user data when decoding the user data.
+
+ 'data' has the raw bits of the user data field of the SMS message.
+ The client software should decode the raw user data according to its
+ supported encoding types and languages.
+
+ EXCEPTION 1: CMT-91 user data raw bits are first translated into BD fields
+ (e.g. num_messages, callback, etc.) The translated user data field in
+ VMN and Short Message is in the form of ASCII characters, each occupying
+ a byte in the resulted 'data'.
+
+ EXCEPTION 2: GSM 7-bit Default characters are decoded so that each byte
+ has one 7-bit GSM character.
+
+ 'number_of_digits' is the number of digits/characters (7, 8, 16, or
+ whatever bits) in the raw user data, which can be used by the client
+ when decoding the user data according to the encoding type and language.
+ -------------------------------------------------------------------------*/
+ unsigned char data_len;
+ unsigned char padding_bits;
+ unsigned char data[ RIL_CDMA_SMS_USER_DATA_MAX];
+ unsigned char number_of_digits;
+
+} RIL_CDMA_SMS_CdmaUserData;
+
+/* -------------------- */
+/* ---- Message Id ---- */
+/* -------------------- */
+typedef enum {
+ RIL_CDMA_SMS_BD_TYPE_RESERVED_0 = 0, RIL_CDMA_SMS_BD_TYPE_DELIVER, /* MT only */
+ RIL_CDMA_SMS_BD_TYPE_SUBMIT, /* MO only */
+ RIL_CDMA_SMS_BD_TYPE_CANCELLATION, /* MO only */
+ RIL_CDMA_SMS_BD_TYPE_DELIVERY_ACK, /* MT only */
+ RIL_CDMA_SMS_BD_TYPE_USER_ACK, /* MT & MO */
+ RIL_CDMA_SMS_BD_TYPE_READ_ACK, /* MT & MO */
+ RIL_CDMA_SMS_BD_TYPE_MAX32 = 0x10000000
+
+} RIL_CDMA_SMS_BdMessageType;
+
+typedef unsigned int RIL_CDMA_SMS_MessageNumber;
+
+typedef struct {
+ RIL_CDMA_SMS_BdMessageType type;
+ RIL_CDMA_SMS_MessageNumber id_number;
+ unsigned char udh_present;
+ /* NOTE: if FEATURE_SMS_UDH is not defined,
+ ** udh_present should be ignored.
+ */
+} RIL_CDMA_SMS_MessageId;
+
+typedef unsigned char RIL_CDMA_SMS_UserResponse;
+
+/* ------------------- */
+/* ---- Timestamp ---- */
+/* ------------------- */
+typedef struct {
+ /* If 'year' is between 96 and 99, the actual year is 1900 + 'year';
+ if 'year' is between 00 and 95, the actual year is 2000 + 'year'.
+ NOTE: Each field has two BCD digits and byte arrangement is <MSB, ... ,LSB>
+ */
+ unsigned char year; /* 0x00-0x99 */
+ unsigned char month; /* 0x01-0x12 */
+ unsigned char day; /* 0x01-0x31 */
+ unsigned char hour; /* 0x00-0x23 */
+ unsigned char minute; /* 0x00-0x59 */
+ unsigned char second; /* 0x00-0x59 */
+ signed char timezone; /* +/-, [-48,+48] number of 15 minutes - GW only */
+} RIL_CDMA_SMS_Timestamp;
+
+/* ------------------ */
+/* ---- Priority ---- */
+/* ------------------ */
+typedef enum {
+ RIL_CDMA_SMS_PRIORITY_NORMAL = 0,
+ RIL_CDMA_SMS_PRIORITY_INTERACTIVE,
+ RIL_CDMA_SMS_PRIORITY_URGENT,
+ RIL_CDMA_SMS_PRIORITY_EMERGENCY,
+ RIL_CDMA_SMS_PRIORITY_MAX32 = 0x10000000
+
+} RIL_CDMA_SMS_Priority;
+
+/* ----------------- */
+/* ---- Privacy ---- */
+/* ----------------- */
+typedef enum {
+ RIL_CDMA_SMS_PRIVACY_NORMAL = 0,
+ RIL_CDMA_SMS_PRIVACY_RESTRICTED,
+ RIL_CDMA_SMS_PRIVACY_CONFIDENTIAL,
+ RIL_CDMA_SMS_PRIVACY_SECRET,
+ RIL_CDMA_SMS_PRIVACY_MAX32 = 0x10000000
+
+} RIL_CDMA_SMS_Privacy;
+
+/* ---------------------- */
+/* ---- Reply option ---- */
+/* ---------------------- */
+typedef struct {
+ /* whether user ack is requested
+ */
+ unsigned char user_ack_requested;
+
+ /* whether delivery ack is requested.
+ Should be FALSE for incoming messages.
+ */
+ unsigned char delivery_ack_requested;
+
+ /* Message originator requests the receiving phone to send back a READ_ACK
+ ** message automatically when the user reads the received message.
+ */
+ unsigned char read_ack_requested;
+
+} RIL_CDMA_SMS_ReplyOption;
+
+typedef enum {
+ RIL_CDMA_SMS_ALERT_MODE_DEFAULT = 0,
+ RIL_CDMA_SMS_ALERT_MODE_LOW_PRIORITY = 1,
+ RIL_CDMA_SMS_ALERT_MODE_MEDIUM_PRIORITY = 2,
+ RIL_CDMA_SMS_ALERT_MODE_HIGH_PRIORITY = 3,
+
+ /* For pre-IS637A implementations, alert_mode only has values of True/False:
+ */
+ RIL_CDMA_SMS_ALERT_MODE_OFF = 0,
+ RIL_CDMA_SMS_ALERT_MODE_ON = 1
+
+} RIL_CDMA_SMS_AlertMode;
+
+/* ------------------ */
+/* ---- Language ---- */
+/* ------------------ */
+typedef enum {
+ RIL_CDMA_SMS_LANGUAGE_UNSPECIFIED = 0,
+ RIL_CDMA_SMS_LANGUAGE_ENGLISH,
+ RIL_CDMA_SMS_LANGUAGE_FRENCH,
+ RIL_CDMA_SMS_LANGUAGE_SPANISH,
+ RIL_CDMA_SMS_LANGUAGE_JAPANESE,
+ RIL_CDMA_SMS_LANGUAGE_KOREAN,
+ RIL_CDMA_SMS_LANGUAGE_CHINESE,
+ RIL_CDMA_SMS_LANGUAGE_HEBREW,
+ RIL_CDMA_SMS_LANGUAGE_MAX32 = 0x10000000
+
+} RIL_CDMA_SMS_Language;
+
+/* ---------------------------------- */
+/* ---------- Display Mode ---------- */
+/* ---------------------------------- */
+typedef enum {
+ RIL_CDMA_SMS_DISPLAY_MODE_IMMEDIATE = 0,
+ RIL_CDMA_SMS_DISPLAY_MODE_DEFAULT = 1,
+ RIL_CDMA_SMS_DISPLAY_MODE_USER_INVOKE = 2,
+ RIL_CDMA_SMS_DISPLAY_MODE_RESERVED = 3
+} RIL_CDMA_SMS_DisplayMode;
+
+/* IS-637B parameters/fields
+ */
+
+/* ---------------------------------- */
+/* ---------- Delivery Status ------- */
+/* ---------------------------------- */
+typedef enum {
+ RIL_CDMA_SMS_DELIVERY_STATUS_ACCEPTED = 0, /* ERROR_CLASS_NONE */
+ RIL_CDMA_SMS_DELIVERY_STATUS_DEPOSITED_TO_INTERNET = 1, /* ERROR_CLASS_NONE */
+ RIL_CDMA_SMS_DELIVERY_STATUS_DELIVERED = 2, /* ERROR_CLASS_NONE */
+ RIL_CDMA_SMS_DELIVERY_STATUS_CANCELLED = 3, /* ERROR_CLASS_NONE */
+
+ RIL_CDMA_SMS_DELIVERY_STATUS_NETWORK_CONGESTION = 4, /* ERROR_CLASS_TEMP & PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_NETWORK_ERROR = 5, /* ERROR_CLASS_TEMP & PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_CANCEL_FAILED = 6, /* ERROR_CLASS_PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_BLOCKED_DESTINATION = 7, /* ERROR_CLASS_PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_TEXT_TOO_LONG = 8, /* ERROR_CLASS_PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_DUPLICATE_MESSAGE = 9, /* ERROR_CLASS_PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_INVALID_DESTINATION = 10, /* ERROR_CLASS_PERM */
+ RIL_CDMA_SMS_DELIVERY_STATUS_MESSAGE_EXPIRED = 13, /* ERROR_CLASS_PERM */
+
+ RIL_CDMA_SMS_DELIVERY_STATUS_UNKNOWN_ERROR = 0x1F /* ERROR_CLASS_PERM */
+
+/* All the other values are reserved */
+
+} RIL_CDMA_SMS_DeliveryStatusE;
+
+typedef struct {
+ RIL_CDMA_SMS_ErrorClass error_class;
+ RIL_CDMA_SMS_DeliveryStatusE status;
+} RIL_CDMA_SMS_DeliveryStatus;
+
+typedef struct {
+ unsigned char address[RIL_CDMA_SMS_IP_ADDRESS_SIZE];
+ unsigned char is_valid;
+} RIL_CDMA_SMS_IpAddress;
+
+/* This special parameter captures any unrecognized/proprietary parameters
+ */
+typedef struct {
+ unsigned char input_other_len;
+ unsigned char desired_other_len; /* used during decoding */
+ unsigned char * other_data;
+} RIL_CDMA_SMS_OtherParm;
+
+typedef struct {
+ /* the mask indicates which fields are present in this message */
+ unsigned int mask;
+
+ RIL_CDMA_SMS_MessageId message_id;
+ RIL_CDMA_SMS_CdmaUserData user_data;
+ RIL_CDMA_SMS_UserResponse user_response;
+ RIL_CDMA_SMS_Timestamp mc_time;
+ RIL_CDMA_SMS_Timestamp validity_absolute;
+ RIL_CDMA_SMS_Timestamp validity_relative;
+ RIL_CDMA_SMS_Timestamp deferred_absolute;
+ RIL_CDMA_SMS_Timestamp deferred_relative;
+ RIL_CDMA_SMS_Priority priority;
+ RIL_CDMA_SMS_Privacy privacy;
+ RIL_CDMA_SMS_ReplyOption reply_option;
+ unsigned char num_messages; /* the actual value; not BCDs */
+ RIL_CDMA_SMS_AlertMode alert_mode;
+ /* For pre-IS-637A implementations, alert_mode is either Off or On. */
+ RIL_CDMA_SMS_Language language;
+ RIL_CDMA_SMS_Address callback;
+ RIL_CDMA_SMS_DisplayMode display_mode;
+
+ RIL_CDMA_SMS_DeliveryStatus delivery_status;
+ unsigned int deposit_index;
+
+ RIL_CDMA_SMS_IpAddress ip_address;
+ unsigned char rsn_no_notify;
+
+ /* See function comments of wms_ts_decode() and
+ ** wms_ts_decode_cdma_bd_with_other() for details regarding 'other' parameters
+ */
+ RIL_CDMA_SMS_OtherParm other;
+
+} RIL_CDMA_SMS_ClientBd;
+
+typedef struct {
+ unsigned char length; /* length, in bytes, of the encoded SMS message */
+ unsigned char * data; /* the encoded SMS message (max 255 bytes) */
+} RIL_CDMA_Encoded_SMS;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /*ANDROID_RIL_CDMA_SMS_H*/
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/LICENSE
new file mode 100644
index 0000000..8aaabff
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("Mobiletek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to Mobiletek Inc. and/or its licensors. Without
+the prior written permission of Mobiletek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of Mobiletek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+Mobiletek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h
new file mode 100644
index 0000000..3485b72
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h
@@ -0,0 +1,268 @@
+#ifndef __LYNQ_QSER_DATA_H__
+#define __LYNQ_QSER_DATA_H__
+
+#include <stdbool.h>
+#include <netinet/in.h>
+
+typedef enum {
+ QSER_DATA_CALL_ERROR_NONE = 0,
+ QSER_DATA_CALL_ERROR_INVALID_PARAMS,
+} qser_data_call_error_e;
+
+typedef enum {
+ QSER_DATA_CALL_DISCONNECTED = 0, /*!< call is disconnected */
+ QSER_DATA_CALL_CONNECTED, /*!< call is connected */
+} qser_data_call_state_e;
+
+typedef enum {
+ QSER_DATA_CALL_TYPE_IPV4 = 0, /*!< IPv4 call. */
+ QSER_DATA_CALL_TYPE_IPV6, /*!< IPv6 call. */
+ QSER_DATA_CALL_TYPE_IPV4V6, /*!< IPv4 and IPv6 call (Only used call start or stop). */
+} qser_data_call_ip_family_e;
+
+typedef enum {
+ QSER_APN_PDP_TYPE_IPV4 = 0,
+ QSER_APN_PDP_TYPE_PPP,
+ QSER_APN_PDP_TYPE_IPV6,
+ QSER_APN_PDP_TYPE_IPV4V6,
+} qser_apn_pdp_type_e;
+
+typedef enum {
+ QSER_APN_AUTH_PROTO_DEFAULT = 0,
+ QSER_APN_AUTH_PROTO_NONE,
+ QSER_APN_AUTH_PROTO_PAP,
+ QSER_APN_AUTH_PROTO_CHAP,
+ QSER_APN_AUTH_PROTO_PAP_CHAP,
+} qser_apn_auth_proto_e;
+
+#define QSER_APN_MAX_LIST 8
+#define QSER_APN_NAME_SIZE 150
+#define QSER_APN_USERNAME_SIZE 127
+#define QSER_APN_PASSWORD_SIZE 127
+
+struct v4_address_status {
+ struct in_addr ip; /*!< Public IPv4 address. */
+ struct in_addr gateway; /*!< Public IPv4 gateway. */
+ struct in_addr pri_dns; /*!< Primary Domain Name Service IP address. */
+ struct in_addr sec_dns; /*!< Secondary Domain Name Service IP address. */
+};
+
+struct v6_address_status {
+ struct in6_addr ip; /*!< Public IPv6 address. */
+ struct in6_addr gateway; /*!< Public IPv6 gateway. */
+ struct in6_addr pri_dns; /*!< Primary Domain Name Service IPv6 address. */
+ struct in6_addr sec_dns; /*!< Secondary Domain Name Service IPv6 address. */
+};
+
+typedef struct {
+ char profile_idx; /*!< UMTS/CMDA profile ID. */
+ char name[16]; /*!< Interface Name. */
+ qser_data_call_ip_family_e ip_family; /*!< IP version. */
+ qser_data_call_state_e state; /*!< The dial status. */
+ qser_data_call_error_e err; /*!< The Reason code after data call disconnected. */
+ union {
+ struct v4_address_status v4; /*!< IPv4 information. */
+ struct v6_address_status v6; /*!< IPv6 information. */
+ };
+} qser_data_call_state_s;
+
+/*
+ *!< Client callback function used to post event indications.
+ */
+typedef void (*qser_data_call_evt_cb_t)(qser_data_call_state_s *state);
+
+typedef struct {
+ char profile_idx; /*!< UMTS/CMDA profile ID. */
+ bool reconnect; /*!< Whether to re-dial after disconnecting the network. */
+ qser_data_call_ip_family_e ip_family; /*!< IP version. */
+ char cdma_username[QSER_APN_USERNAME_SIZE]; /*!< Username used during data network authentication. */
+ char cdma_password[QSER_APN_PASSWORD_SIZE]; /*!< Password to be used during data network authentication. */
+} qser_data_call_s;
+
+struct pkt_stats {
+ unsigned long pkts_tx; /*!< Number of packets transmitted. */
+ unsigned long pkts_rx; /*!< Number of packets received. */
+ long long bytes_tx; /*!< Number of bytes transmitted. */
+ long long bytes_rx; /*!< Number of bytes received. */
+ unsigned long pkts_dropped_tx; /*!< Number of transmit packets dropped. */
+ unsigned long pkts_dropped_rx; /*!< Number of receive packets dropped. */
+};
+
+struct v4_info {
+ char name[16]; /*!< Interface Name. */
+ qser_data_call_state_e state; /*!< The dial status. */
+ bool reconnect; /*!< re-dial flag. */
+ struct v4_address_status addr; /*!< IPv4 IP Address information. */
+ struct pkt_stats stats; /*!< IPv4 statics */
+};
+
+struct v6_info {
+ char name[16]; /*!< Interface Name. */
+ qser_data_call_state_e state; /*!< The dial status. */
+ bool reconnect; /*!< re-dial flag. */
+ struct v6_address_status addr; /*!< IPv6 IP Address information. */
+ struct pkt_stats stats; /*!< IPv6 statics */
+};
+
+typedef struct {
+ char profile_idx; /*!< UMTS/CDMA profile ID. */
+ qser_data_call_ip_family_e ip_family; /*!< IP version. */
+ struct v4_info v4; /*!< IPv4 information */
+ struct v6_info v6; /*!< IPv6 information */
+} qser_data_call_info_s;
+
+typedef struct {
+ unsigned char profile_idx; /*!< UMTS/CDMA profile ID. */
+ qser_apn_pdp_type_e pdp_type; /*!< Packet Data Protocol (PDP) type specifies the type of data payload
+ exchanged over the airlink when the packet data session is
+ established with this profile. */
+ qser_apn_auth_proto_e auth_proto; /*!< Authentication Protocol. */
+ char apn_name[QSER_APN_NAME_SIZE]; /*!< A string parameter that is a logical name used to select the GGSN
+ and external packet data network. */
+ char username[QSER_APN_USERNAME_SIZE]; /*!< Username used during data network authentication. */
+ char password[QSER_APN_PASSWORD_SIZE]; /*!< Password to be used during data network authentication. */
+ char apn_type[QSER_APN_NAME_SIZE];
+} qser_apn_info_s;
+
+typedef struct {
+ qser_apn_pdp_type_e pdp_type; /*!< Packet Data Protocol (PDP) type specifies the type of data payload
+ exchanged over the airlink when the packet data session is
+ established with this profile. */
+ qser_apn_auth_proto_e auth_proto; /*!< Authentication Protocol. */
+ char apn_name[QSER_APN_NAME_SIZE]; /*!< A string parameter that is a logical name used to select the GGSN
+ and external packet data network. */
+ char username[QSER_APN_USERNAME_SIZE]; /*!< Username used during data network authentication. */
+ char password[QSER_APN_PASSWORD_SIZE]; /*!< Password to be used during data network authentication. */
+ char apn_type[QSER_APN_NAME_SIZE];
+} qser_apn_add_s;
+
+typedef struct {
+ int cnt;
+ qser_apn_info_s apn[QSER_APN_MAX_LIST];
+} qser_apn_info_list_s;
+
+
+/**
+ * Initialization data call module, and callback function registered.
+ *
+ * @param [in] evt_cb callback fucntion
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_data_call_init(qser_data_call_evt_cb_t evt_cb);
+
+/**
+ * Destroy data call module, and unregister callback funciton
+ *
+ * @param
+ * None
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern void qser_data_call_destroy(void);
+
+/**
+ * Starts a data call. If profile index is zero, it will call CDMA profile.
+ *
+ * @param [in] data_call The data call parameters
+ * @param [out] error Error code returned by data call
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_data_call_start(qser_data_call_s *data_call, qser_data_call_error_e *err);
+
+/**
+ * Stop a data call.
+ *
+ * @param [in] profile_idx UMTS/CDMA profile ID
+ * @param [in] ip_family IP Version
+ * @param [out] error Error code returned by data call
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_data_call_stop(char profile_idx, qser_data_call_ip_family_e ip_family, qser_data_call_error_e *err);
+
+/**
+ * Get a data call information.
+ *
+ * @param [in] profile_idx UMTS/CDMA profile ID
+ * @param [in] ip_family IP Version
+ * @param [out] info The Data Call information
+ * @param [out] error Error code returned by data call
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_data_call_info_get(char profile_idx,
+ qser_data_call_ip_family_e ip_family,
+ qser_data_call_info_s *info,
+ qser_data_call_error_e *err);
+
+/**
+ * Changes the settings in a configured profile.
+ *
+ * @param [in] apn the profile information.
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned, such apn not exist.
+ *
+ */
+extern int qser_apn_set(qser_apn_info_s *apn);
+
+/**
+ * Retrieves the settings from a configured profile.
+ *
+ * @param [in] profile_idx UMTS/CDMA profile ID
+ * @param [out] apn the profile information.
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_apn_get(unsigned char profile_idx, qser_apn_info_s *apn);
+
+/**
+ * Retrieves the settings from a configured profile.
+ *
+ * @param [in] apn the profile information.
+ * @param [out] profile_idx UMTS/CDMA profile ID
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_apn_add(qser_apn_add_s *apn, unsigned char *profile_idx);
+
+/**
+ * Delete a configured profile.
+ *
+ * @param [in] profile_idx UMTS/CDMA profile ID
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_apn_del(unsigned char profile_idx);
+
+/**
+ * Retrieves the settings from a configured profile list.
+ *
+ * @param [out] apn_list the profile list information.
+ *
+ * @return
+ * On success, 0 is returned. On error, -1 is returned.
+ *
+ */
+extern int qser_apn_get_list(qser_apn_info_list_s *apn_list);
+
+#endif
+
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
new file mode 100644
index 0000000..cfffa79
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -0,0 +1,836 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <log/log.h>
+#include <libdata/lynq_data.h>
+#include <liblog/lynq_deflog.h>
+#include <pthread.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include "lynq-qser-data.h"
+
+#define USER_LOG_TAG "LYNQ_QSER_DATA"
+
+#define RESULT_OK (0)
+#define RESULT_ERROR (-1)
+
+static pthread_t s_cb_tid = -1;
+static int s_qser_data_cb_thread_status = 0;
+static pthread_mutex_t s_qser_data_cb_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_cond_t s_qser_data_cb_cond = PTHREAD_COND_INITIALIZER;
+
+#define data_xml_path "/data/lynq_qser_data_apn.xml"
+
+static qser_data_call_evt_cb_t s_data_call_cb = NULL;
+const int apndb_offset = 683;
+
+void lynq_ipv4_aton_urc(lynq_data_call_response_v11_t *libdata,qser_data_call_state_s *data_res)
+{
+ inet_aton(libdata->addresses,&(data_res->v4.ip));
+ inet_aton(libdata->gateways,&(data_res->v4.gateway));
+ inet_aton(libdata->dnses,&(data_res->v4.pri_dns));
+ inet_aton(libdata->dnses,&(data_res->v4.sec_dns));
+ return ;
+}
+
+void lynq_ipv6_inet_pton_urc(lynq_data_call_response_v11_t *libdata,qser_data_call_state_s *data_res)
+{
+ inet_pton(AF_INET6,libdata->addresses,&(data_res->v6.ip));
+ inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.gateway));
+ inet_pton(AF_INET6,libdata->dnses,&(data_res->v6.pri_dns));
+ inet_pton(AF_INET6,libdata->dnses,&(data_res->v6.sec_dns));
+ return ;
+}
+
+void lynq_ipv4_aton_getinfo(lynq_data_call_response_v11_t *libdata,qser_data_call_info_s *data_res)
+{
+ inet_aton(libdata->addresses,&(data_res->v4.addr.ip));
+ inet_aton(libdata->gateways,&(data_res->v4.addr.gateway));
+ inet_aton(libdata->dnses,&(data_res->v4.addr.pri_dns));
+ inet_aton(libdata->dnses,&(data_res->v4.addr.sec_dns));
+ data_res->v4.stats.pkts_tx = 0;
+ data_res->v4.stats.pkts_rx = 0;
+ data_res->v4.stats.bytes_tx = 0;
+ data_res->v4.stats.bytes_rx = 0;
+ data_res->v4.stats.pkts_dropped_tx = 0;
+ data_res->v4.stats.pkts_dropped_rx = 0;
+ return ;
+}
+
+void lynq_ipv6_inet_pton_getinfo(lynq_data_call_response_v11_t *libdata,qser_data_call_info_s *data_res)
+{
+ inet_pton(AF_INET6,libdata->addresses,&(data_res->v6.addr.ip));
+ inet_pton(AF_INET6,libdata->gateways,&(data_res->v6.addr.gateway));
+ inet_pton(AF_INET6,libdata->dnses,&(data_res->v6.addr.pri_dns));
+ inet_pton(AF_INET6,libdata->dnses,&(data_res->v6.addr.sec_dns));
+ data_res->v6.stats.pkts_tx = 0;
+ data_res->v6.stats.pkts_rx = 0;
+ data_res->v6.stats.bytes_tx = 0;
+ data_res->v6.stats.bytes_rx = 0;
+ data_res->v6.stats.pkts_dropped_tx = 0;
+ data_res->v6.stats.pkts_dropped_rx = 0;
+ return ;
+}
+
+void datacall_ipv4_status_judge(int state,qser_data_call_info_s *data_res)
+{
+ if (state != 0)
+ {
+ data_res->v4.state = QSER_DATA_CALL_CONNECTED;
+ data_res->v4.reconnect = 1;
+ }
+ else
+ {
+ data_res->v4.state = QSER_DATA_CALL_DISCONNECTED;
+ data_res->v4.reconnect = 0;
+ }
+ return ;
+}
+
+void datacall_ipv6_status_judge(int state,qser_data_call_info_s *data_res)
+{
+ if (state != 0)
+ {
+ data_res->v6.state = QSER_DATA_CALL_CONNECTED;
+ data_res->v6.reconnect = 1;
+ }
+ else
+ {
+ data_res->v6.state = QSER_DATA_CALL_DISCONNECTED;
+ data_res->v6.reconnect = 0;
+ }
+ return ;
+}
+
+
+int apn_xml_add(qser_apn_add_s *apn,unsigned char *apn_num)
+{
+ int node_num = 0;
+ char temp_buff[12];
+ xmlDocPtr pdoc = NULL;
+ xmlNodePtr node = NULL;
+ xmlNodePtr tmp_node = NULL;
+ xmlNodePtr sum_node = NULL;
+ pdoc = xmlReadFile(data_xml_path ,"UTF-8",XML_PARSE_RECOVER);
+ if(NULL == pdoc)
+ {
+ LYERRLOG("open xml file error");
+ goto FAILED;
+ }
+
+ node = xmlDocGetRootElement(pdoc);
+ if (NULL == node)
+ {
+ LYERRLOG("xmlDocGetRootElement() error");
+ goto FAILED;
+ }
+ sum_node = node->xmlChildrenNode;
+ sum_node = sum_node->next;
+ while (sum_node != NULL)
+ {
+ if (xmlGetProp(sum_node, "profile_idx") == NULL) //Null Node
+ {
+ sum_node = sum_node->next;
+ continue;
+ }
+ node_num++;
+ sum_node = sum_node->next;
+ }
+ tmp_node = xmlNewNode(NULL,BAD_CAST"apn");
+ *apn_num = node_num;
+ LYERRLOG("apn_num%d ",node_num);
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",*apn_num);
+ xmlNewProp(tmp_node,BAD_CAST"profile_idx",(xmlChar *)temp_buff);
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",apn->pdp_type);
+ xmlNewProp(tmp_node,BAD_CAST"pdp_type",(xmlChar *)temp_buff);
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",apn->auth_proto);
+ xmlNewProp(tmp_node,BAD_CAST"auth_proto",(xmlChar *)temp_buff);
+ xmlNewProp(tmp_node,BAD_CAST"apn_name",(xmlChar *)apn->apn_name);
+ xmlNewProp(tmp_node,BAD_CAST"username",(xmlChar *)apn->username);
+ xmlNewProp(tmp_node,BAD_CAST"password",(xmlChar *)apn->password);
+ xmlNewProp(tmp_node,BAD_CAST"apn_type",(xmlChar *)apn->apn_type);
+ xmlAddChild(node,tmp_node);
+ xmlSaveFormatFileEnc(data_xml_path, pdoc, "UTF-8", 1);
+ xmlFreeDoc(pdoc);
+ return RESULT_OK;
+
+ FAILED:
+ if (pdoc)
+ {
+ xmlFreeDoc(pdoc);
+ }
+ return RESULT_ERROR;
+}
+
+int apn_xml_delete(unsigned char profile_idx)
+{
+ int node_num = 0;
+ char temp_buff[12];
+ xmlDocPtr pdoc = NULL;
+ xmlNodePtr node = NULL;
+ xmlNodePtr modify_node = NULL;
+ pdoc = xmlReadFile(data_xml_path ,"UTF-8",XML_PARSE_RECOVER);
+ if(NULL == pdoc)
+ {
+ LYERRLOG("open xml file error");
+ goto FAILED;
+ }
+
+ node = xmlDocGetRootElement(pdoc);
+ if (NULL == node)
+ {
+ LYERRLOG("xmlDocGetRootElement() error");
+ goto FAILED;
+ }
+ modify_node = node->xmlChildrenNode;
+ modify_node = modify_node->next;
+ for (node_num=0 ;node_num<(int)profile_idx ; node_num++)
+ {
+ if (xmlGetProp(modify_node, "profile_idx") == NULL) //Null Node
+ {
+ modify_node = modify_node->next;
+ node_num--;
+ continue;
+ }
+ modify_node = modify_node->next;
+ }
+ xmlUnlinkNode(modify_node);
+ xmlFreeNode(modify_node);
+ modify_node = NULL;
+ node_num = 0;
+ modify_node = node->xmlChildrenNode;
+ modify_node = modify_node->next;
+ while (modify_node != NULL)
+ {
+ if (xmlGetProp(modify_node, "profile_idx") == NULL) //Null Node
+ {
+ modify_node = modify_node->next;
+ continue;
+ }
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",node_num);
+ xmlSetProp(modify_node,BAD_CAST"profile_idx",(xmlChar *)temp_buff);
+ modify_node = modify_node->next;
+ node_num++;
+ }
+ xmlSaveFormatFileEnc(data_xml_path, pdoc, "UTF-8", 1);
+ xmlFreeDoc(pdoc);
+ return RESULT_OK;
+
+ FAILED:
+ if (pdoc)
+ {
+ xmlFreeDoc(pdoc);
+ }
+ return RESULT_ERROR;
+}
+
+int apn_xml_modify(qser_apn_info_s *apn)
+{
+ int node_num = 0;
+ char temp_buff[12];
+ xmlDocPtr pdoc = NULL;
+ xmlNodePtr node = NULL;
+ xmlNodePtr modify_node = NULL;
+ pdoc = xmlReadFile(data_xml_path ,"UTF-8",XML_PARSE_RECOVER);
+ if(NULL == pdoc)
+ {
+ LYERRLOG("open xml file error");
+ goto FAILED;
+ }
+
+ node = xmlDocGetRootElement(pdoc);
+ if (NULL == node)
+ {
+ LYERRLOG("xmlDocGetRootElement() error");
+ goto FAILED;
+ }
+ modify_node = node->xmlChildrenNode;
+ modify_node = modify_node->next;
+ for (node_num=0; node_num<(int)apn->profile_idx;node_num++)
+ {
+ if (xmlGetProp(modify_node, "profile_idx") == NULL) //Null Node
+ {
+ modify_node = modify_node->next;
+ node_num--;
+ continue;
+ }
+ modify_node = modify_node->next;
+ }
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",node_num);
+ xmlSetProp(modify_node,BAD_CAST"profile_idx",(xmlChar *)temp_buff);
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",apn->pdp_type);
+ xmlSetProp(modify_node,BAD_CAST"pdp_type",(xmlChar *)temp_buff);
+ bzero(temp_buff,12);
+ snprintf(temp_buff,sizeof(temp_buff),"%d",apn->auth_proto);
+ xmlSetProp(modify_node,BAD_CAST"auth_proto",(xmlChar *)temp_buff);
+ xmlSetProp(modify_node,BAD_CAST"apn_name",(xmlChar *)apn->apn_name);
+ xmlSetProp(modify_node,BAD_CAST"username",(xmlChar *)apn->username);
+ xmlSetProp(modify_node,BAD_CAST"password",(xmlChar *)apn->password);
+ xmlSetProp(modify_node,BAD_CAST"apn_type",(xmlChar *)apn->apn_type);
+ xmlSaveFormatFileEnc(data_xml_path, pdoc, "UTF-8", 1);
+ xmlFreeDoc(pdoc);
+ return RESULT_OK;
+
+ FAILED:
+ if (pdoc)
+ {
+ xmlFreeDoc(pdoc);
+ }
+ return RESULT_ERROR;
+}
+
+
+int apn_xml_query(unsigned char profile_idx,qser_apn_info_s *apn)
+{
+ int node_num = 0;
+ xmlDocPtr pdoc = NULL;
+ xmlNodePtr node = NULL;
+ xmlNodePtr modify_node = NULL;
+ unsigned char temp = NULL;
+ pdoc = xmlReadFile(data_xml_path ,"UTF-8",XML_PARSE_RECOVER);
+ if(NULL == pdoc)
+ {
+ LYERRLOG("open xml file error");
+ goto FAILED;
+ }
+
+ node = xmlDocGetRootElement(pdoc);
+ if (NULL == node)
+ {
+ LYERRLOG("xmlDocGetRootElement() error");
+ goto FAILED;
+ }
+ modify_node = node->xmlChildrenNode;
+ modify_node = modify_node->next;
+ for (node_num = 0;node_num<(int)profile_idx;node_num++)
+ {
+ if (xmlGetProp(modify_node, "profile_idx") == NULL) //Null Node
+ {
+ modify_node = modify_node->next;
+ node_num--;
+ continue;
+ }
+ modify_node = modify_node->next;
+ }
+ apn->profile_idx = (unsigned char)atoi(xmlGetProp(modify_node, "profile_idx"));
+ apn->pdp_type = (qser_apn_pdp_type_e)atoi(xmlGetProp(modify_node, "pdp_type"));
+ apn->auth_proto = (qser_apn_auth_proto_e)atoi(xmlGetProp(modify_node, "auth_proto"));
+ strcpy(apn->apn_name,(char *)xmlGetProp(modify_node, "apn_name"));
+ strcpy(apn->username,(char *)xmlGetProp(modify_node, "username"));
+ strcpy(apn->password,(char *)xmlGetProp(modify_node, "password"));
+ strcpy(apn->apn_type,(char *)xmlGetProp(modify_node, "apn_type"));
+ xmlSaveFormatFileEnc(data_xml_path, pdoc, "UTF-8", 1);
+ xmlFreeDoc(pdoc);
+ return RESULT_OK;
+
+ FAILED:
+ if (pdoc)
+ {
+ xmlFreeDoc(pdoc);
+ }
+ return RESULT_ERROR;
+}
+
+int apn_xml_query_list(qser_apn_info_list_s *apn_list)
+{
+ int node_num = 0;
+ xmlDocPtr pdoc = NULL;
+ xmlNodePtr node = NULL;
+ xmlNodePtr modify_node = NULL;
+ xmlChar *temp_char;
+ char temp[64];
+ pdoc = xmlReadFile(data_xml_path ,"UTF-8",XML_PARSE_RECOVER);
+ if(NULL == pdoc)
+ {
+ LYERRLOG("open xml file error");
+ goto FAILED;
+ }
+
+ node = xmlDocGetRootElement(pdoc);
+ if (NULL == node)
+ {
+ LYERRLOG("xmlDocGetRootElement() error");
+ goto FAILED;
+ }
+ modify_node = node->xmlChildrenNode;
+ modify_node = modify_node->next;
+ while (modify_node != NULL)
+ {
+ temp_char = xmlGetProp(modify_node, "profile_idx");
+ if (temp_char == NULL)
+ {
+ modify_node = modify_node->next;
+ continue;
+ }
+ sprintf(temp,"%s",temp_char);
+ apn_list->apn[node_num].profile_idx = (unsigned char)atoi(temp);
+ apn_list->apn[node_num].pdp_type = (qser_apn_pdp_type_e)atoi(xmlGetProp(modify_node, "pdp_type"));
+ apn_list->apn[node_num].auth_proto = (qser_apn_auth_proto_e)atoi(xmlGetProp(modify_node, "auth_proto"));
+ strcpy(apn_list->apn[node_num].apn_name,(char *)xmlGetProp(modify_node, "apn_name"));
+ strcpy(apn_list->apn[node_num].username,(char *)xmlGetProp(modify_node, "username"));
+ strcpy(apn_list->apn[node_num].password,(char *)xmlGetProp(modify_node, "password"));
+ node_num ++;
+ modify_node = modify_node->next;
+ }
+ apn_list->cnt = node_num;
+ xmlSaveFormatFileEnc(data_xml_path, pdoc, "UTF-8", 1);
+ xmlFreeDoc(pdoc);
+ return RESULT_OK;
+
+ FAILED:
+ if (pdoc)
+ {
+ xmlFreeDoc(pdoc);
+ }
+ return RESULT_ERROR;
+}
+
+void judge_pdp_type(qser_apn_pdp_type_e pdp_type,char *out_pdp_type)
+{
+ switch (pdp_type)
+ {
+ case QSER_APN_PDP_TYPE_IPV4:
+ strcpy(out_pdp_type,"IPV4");
+ break;
+ case QSER_APN_PDP_TYPE_PPP:
+ strcpy(out_pdp_type,"PPP");
+ break;
+ case QSER_APN_PDP_TYPE_IPV6:
+ strcpy(out_pdp_type,"IPV6");
+ break;
+ case QSER_APN_PDP_TYPE_IPV4V6:
+ strcpy(out_pdp_type,"IPV4V6");
+ break;
+ default:
+ strcpy(out_pdp_type,"NULL");
+ break;
+ }
+ return;
+}
+void judge_authtype(qser_apn_auth_proto_e auth_proto,char *out_proto)
+{
+ switch (auth_proto)
+ {
+ case QSER_APN_AUTH_PROTO_DEFAULT:
+ strcpy(out_proto,"NULL;authType=0");
+ break;
+ case QSER_APN_AUTH_PROTO_NONE:
+ strcpy(out_proto,"NULL;authType=1");
+ break;
+ case QSER_APN_AUTH_PROTO_PAP:
+ strcpy(out_proto,"NULL;authType=2");
+ break;
+ case QSER_APN_AUTH_PROTO_CHAP:
+ strcpy(out_proto,"NULL;authtype=3");
+ break;
+ case QSER_APN_AUTH_PROTO_PAP_CHAP:
+ strcpy(out_proto,"NULL;authtype=4");
+ break;
+ default:
+ strcpy(out_proto,"NULL;authType=NULL");
+ break;
+ }
+ return ;
+}
+
+int data_call_handle_get(const char profile_idx,int *handle)
+{
+ int num = LYNQ_APN_CHANNEL_MAX;
+ int table_num = 0;
+ lynq_apn_info **apn_table = NULL;
+ qser_apn_info_s apn;
+ apn_table = (lynq_apn_info **)malloc(sizeof(lynq_apn_info *)*LYNQ_APN_CHANNEL_MAX);
+ if (NULL == apn_table)
+ {
+ LYERRLOG("malloc apn_table fail ");
+ return RESULT_ERROR;
+ }
+ for(int i =0;i<10;i++)
+ {
+ apn_table[i] = (lynq_apn_info*)malloc(sizeof(lynq_apn_info));
+ if (apn_table[i]==NULL)
+ {
+ for (int n=0;n<i;n++)
+ {
+ free(apn_table[n]);
+ }
+ return RESULT_ERROR;
+ }
+ memset(apn_table[i],0,sizeof(lynq_apn_info));
+ }
+ lynq_get_apn_table(&table_num,apn_table);
+ memset(&apn,0,sizeof(qser_apn_info_s));
+ apn_xml_query(profile_idx,&apn);
+ for (int j = 0;j < table_num;j++)
+ {
+ if (strcmp(apn.apn_type,apn_table[j]->apnType) == 0)
+ {
+ *handle = apn_table[j]->index;
+ LYINFLOG("apn_table->index:%d,handle:%d ",apn_table[j]->index,*handle);
+ break;
+ }
+ }
+
+ for (int i = 0; i < LYNQ_APN_CHANNEL_MAX; i++)
+ {
+ if (apn_table[i]!=NULL)
+ {
+ free(apn_table[i]);
+ apn_table[i]=NULL;
+ }
+ }
+ free(apn_table);
+ apn_table=NULL;
+ LYINFLOG("data_call_handle_get end");
+ return RESULT_OK;
+}
+
+void *thread_wait_cb_status(void)
+{
+ int handle = -1;
+ lynq_data_call_response_v11_t data_urc_info;
+ qser_data_call_state_s data_cb_state;
+ while (s_qser_data_cb_thread_status)
+ {
+ lynq_wait_data_call_state_change(&handle);
+ lynq_get_data_call_list(&handle,&data_urc_info);
+ /*compare paramter*/
+ data_cb_state.profile_idx = (char)handle;
+
+ memcpy(data_cb_state.name,data_urc_info.ifname,strlen(data_urc_info.ifname)+1);
+ if (!strcmp(data_urc_info.type,"IPV4"))
+ {
+ data_cb_state.ip_family = QSER_DATA_CALL_TYPE_IPV4;
+ }
+ else if (!strcmp(data_urc_info.type,"IPV6"))
+ {
+ data_cb_state.ip_family = QSER_DATA_CALL_TYPE_IPV6;
+ }
+ else if (strcmp(data_urc_info.type,"IPV4V6"))
+ {
+ data_cb_state.ip_family = QSER_DATA_CALL_TYPE_IPV4V6;
+ }
+ else
+ {
+ LYERRLOG("unknow data call type");
+ continue;
+ }
+
+ if (data_urc_info.status != 0)
+ {
+ data_cb_state.state = QSER_DATA_CALL_CONNECTED;
+ }
+ else
+ {
+ data_cb_state.state = QSER_DATA_CALL_DISCONNECTED;
+ }
+ if (data_cb_state.ip_family == QSER_DATA_CALL_TYPE_IPV4)
+ {
+ lynq_ipv4_aton_urc(&data_urc_info,&data_cb_state);
+ }
+ else if (data_cb_state.ip_family == QSER_DATA_CALL_TYPE_IPV6)
+ {
+ lynq_ipv6_inet_pton_urc(&data_urc_info,&data_cb_state);
+ }
+ else if (data_cb_state.ip_family == QSER_DATA_CALL_TYPE_IPV4V6)
+ {
+ lynq_ipv6_inet_pton_urc(&data_urc_info,&data_cb_state);
+ }
+ else
+ {
+ LYERRLOG("unknow ip_family");
+ continue;
+ }
+ if (s_data_call_cb != NULL)
+ {
+ s_data_call_cb(&data_cb_state);
+ }
+ }
+ return NULL;
+}
+
+int qser_cb_pthread_create()
+{
+ int ret;
+ s_qser_data_cb_thread_status = 1;
+ ret = pthread_create(&s_cb_tid,NULL,thread_wait_cb_status,NULL);
+ if (ret < 0)
+ {
+ LYERRLOG("pthread create fail");
+ s_qser_data_cb_thread_status = 0;
+ return RESULT_ERROR;
+ }
+ return RESULT_OK;
+}
+
+void qser_cb_pthread_cancel()
+{
+ int ret;
+ s_qser_data_cb_thread_status = 0;
+ if (s_cb_tid != -1)
+ {
+ ret = pthread_cancel(s_cb_tid);
+ LYDBGLOG("pthread cancel ret = %d",ret);
+ ret = pthread_join(s_cb_tid,NULL);
+ LYDBGLOG("pthread join ret = %d",ret);
+ s_cb_tid = -1;
+ }
+ return;
+}
+
+int qser_data_call_init(qser_data_call_evt_cb_t evt_cb)
+{
+ int ret = 0;
+ int utoken = 0;
+ if (NULL == evt_cb)
+ {
+ LYERRLOG("init incoming paramters error");
+ return RESULT_ERROR;
+ }
+ s_data_call_cb = evt_cb;
+ qser_cb_pthread_create();
+ ret = lynq_init_data(utoken);
+ if (ret != RESULT_OK)
+ {
+ qser_cb_pthread_cancel();
+ s_data_call_cb = NULL;
+ return RESULT_ERROR;
+ }
+ return RESULT_OK;
+}
+
+void qser_data_call_destroy(void)
+{
+ qser_cb_pthread_cancel();
+ lynq_deinit_data();
+ s_data_call_cb = NULL;
+ return ;
+}
+
+int qser_data_call_start(qser_data_call_s *data_call, qser_data_call_error_e *err)
+{
+ int ret = -1;
+ int handle = 0;
+ if (NULL == data_call || NULL == err)
+ {
+ LYERRLOG("call start incoming paramters error");
+ return ret;
+ }
+ if (data_call->profile_idx == 0)
+ {
+ ret = lynq_setup_data_call(&handle);
+ }
+ else
+ {
+ char pdptype[16];
+ qser_apn_info_s apn_info;
+ qser_apn_get(data_call->profile_idx,&apn_info);
+ judge_pdp_type(apn_info.pdp_type,pdptype);
+ ret = lynq_setup_data_call_sp(&handle,apn_info.apn_name,apn_info.apn_type,apn_info.username,apn_info.password,NULL,pdptype,pdptype);
+ }
+ if (ret < 0)
+ {
+ *err = QSER_DATA_CALL_ERROR_INVALID_PARAMS;
+ }
+ return ret;
+}
+
+int qser_data_call_stop(char profile_idx, qser_data_call_ip_family_e ip_family, qser_data_call_error_e *err)
+{
+ int ret = 0;
+ int handle = -1;
+
+ if (NULL == err)
+ {
+ LYERRLOG("call stop incoming paramters error");
+ return ret;
+ }
+ data_call_handle_get(profile_idx,&handle);
+ ret = lynq_deactive_data_call(&handle);
+ if (ret < 0)
+ {
+ *err = QSER_DATA_CALL_ERROR_INVALID_PARAMS;
+ }
+ return RESULT_OK;
+}
+int qser_data_call_info_get(char profile_idx,qser_data_call_ip_family_e ip_family,qser_data_call_info_s *info,qser_data_call_error_e *err)
+{
+ int ret = 0;
+ int handle = -1;
+ lynq_data_call_response_v11_t data_call_info;
+ data_call_handle_get(profile_idx,&handle);
+ ret = lynq_get_data_call_list(&handle,&data_call_info);
+ if (ret == 0)
+ {
+ info->profile_idx = profile_idx;
+ info->ip_family = ip_family;
+ if (strcmp(data_call_info.type,"IPV4"))
+ {
+ strcpy(info->v4.name,data_call_info.ifname);
+ datacall_ipv4_status_judge(data_call_info.status,info);
+ LYINFLOG("[IPV4]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ lynq_ipv4_aton_getinfo(&data_call_info,info);
+ }
+ else if (strcmp(data_call_info.type,"IPV6"))
+ {
+ strcpy(info->v6.name,data_call_info.ifname);
+
+ datacall_ipv6_status_judge(data_call_info.status,info);
+ LYINFLOG("[IPV6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ lynq_ipv6_inet_pton_getinfo(&data_call_info,info);
+ }
+ else if (strcmp(data_call_info.type,"IPV4V6"))
+ {
+ strcpy(info->v4.name,data_call_info.ifname);
+ datacall_ipv4_status_judge(data_call_info.status,info);
+ LYINFLOG("[IPV4V6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ lynq_ipv4_aton_getinfo(&data_call_info,info);
+ strcpy(info->v6.name,data_call_info.ifname);
+ datacall_ipv6_status_judge(data_call_info.status,info);
+ LYINFLOG("[IPV4V6]addresses:%s,gateways:%s,dnses:%s",data_call_info.addresses,data_call_info.gateways,data_call_info.dnses);
+ lynq_ipv6_inet_pton_getinfo(&data_call_info,info);
+ }
+ else
+ {
+ LYERRLOG("useless qser_data_call_ip_family_e");
+ }
+ }
+ return ret;
+}
+int qser_apn_set(qser_apn_info_s *apn)
+{
+ int ret = 0;
+ if (NULL == apn)
+ {
+ LYERRLOG("apn set incoming paramters error");
+ return RESULT_ERROR;
+ }
+ ret = apn_xml_modify(apn);
+ if (ret < 0)
+ {
+ LYERRLOG("apn_xml_modify error");
+ return ret;
+ }
+ int apn_id = 0;
+ char tmp_id[12];
+ char *outinfo = NULL;
+ char normalprotocol[16];
+ char authtype[32];
+ outinfo = (char *)malloc(sizeof(char)*512);
+ bzero(tmp_id,12);
+ bzero(outinfo,512);
+ apn_id = apn->profile_idx + apndb_offset;
+ snprintf(tmp_id,sizeof(tmp_id),"%d",apn_id);
+ judge_pdp_type(apn->pdp_type,normalprotocol);
+ judge_authtype(apn->auth_proto,authtype);
+ lynq_modify_apn_db(3,tmp_id,NULL,NULL,apn->apn_name,apn->apn_type,apn->username,apn->password,normalprotocol,normalprotocol,authtype,outinfo);
+ LYINFLOG("[output]:%s",outinfo);
+ free(outinfo);
+ outinfo = NULL;
+ return RESULT_OK;
+}
+
+int qser_apn_get(unsigned char profile_idx, qser_apn_info_s *apn)
+{
+ if (profile_idx < 0 || profile_idx > 24 || NULL == apn)
+ {
+ LYERRLOG("apn get incoming paramters error");
+ return RESULT_ERROR;
+ }
+ int ret = 0;
+ ret = apn_xml_query(profile_idx,apn);
+ if (ret < 0)
+ {
+ LYERRLOG("apn_xml_query error");
+ return ret;
+ }
+ return ret;
+}
+
+int qser_apn_add(qser_apn_add_s *apn, unsigned char *profile_idx)
+{
+ int ret = 0;
+ if (NULL == apn || NULL == profile_idx)
+ {
+ LYERRLOG("apn add incoming paramters error");
+ return RESULT_ERROR;
+ }
+ ret = apn_xml_add(apn,profile_idx);
+ if (ret < 0)
+ {
+ LYERRLOG("apn_xml_add error");
+ return ret;
+ }
+ int apn_id = 0;
+ char tmp_id[12];
+ char *outinfo = NULL;
+ char normalprotocol[16];
+ char authtype[32];
+ outinfo = (char *)malloc(sizeof(char)*512);
+ bzero(tmp_id,12);
+ bzero(outinfo,512);
+ snprintf(tmp_id,sizeof(tmp_id),"%d",apn_id);
+ judge_pdp_type(apn->pdp_type,normalprotocol);
+ judge_authtype(apn->auth_proto,authtype);
+ lynq_modify_apn_db(0,tmp_id,NULL,NULL,apn->apn_name,apn->apn_type,apn->username,apn->password,normalprotocol,normalprotocol,authtype,outinfo);
+ LYINFLOG("[output]:%s",outinfo);
+ free(outinfo);
+ outinfo = NULL;
+ return RESULT_OK;
+}
+
+int qser_apn_del(unsigned char profile_idx)
+{
+ if (profile_idx < 0 || profile_idx > 24)
+ {
+ LYERRLOG("apn del incoming paramters error");
+ return RESULT_OK;
+ }
+ int ret = 0;
+ ret = apn_xml_delete(profile_idx);
+ if (ret < 0)
+ {
+ LYERRLOG("apn_xml_delete error");
+ return ret;
+ }
+ int apn_id = 0;
+ char tmp_id[12];
+ char *outinfo = NULL;
+ outinfo = (char *)malloc(sizeof(char)*512);
+ bzero(tmp_id,12);
+ bzero(outinfo,512);
+ apn_id = profile_idx+apndb_offset;
+ snprintf(tmp_id,sizeof(tmp_id),"%d",apn_id);
+ lynq_modify_apn_db(1,tmp_id,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,outinfo);
+ LYINFLOG("[output]:%s",outinfo);
+ free(outinfo);
+ outinfo = NULL;
+ return ret;
+}
+
+int qser_apn_get_list(qser_apn_info_list_s *apn_list)
+{
+ if (NULL == apn_list)
+ {
+ LYERRLOG("apn_list incoming paramters error");
+ return RESULT_ERROR;
+ }
+ int ret = 0;
+ ret = apn_xml_query_list(apn_list);
+ if (ret < 0)
+ {
+ LYERRLOG("apn_xml_query_list error");
+ return ret;
+ }
+ return ret;
+}
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq_qser_data_apn.xml b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq_qser_data_apn.xml
new file mode 100644
index 0000000..590d493
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq_qser_data_apn.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lynq_qser_data_apn>
+ <apn profile_idx="0" pdp_type="3" auth_proto="0" apn_name="default" username="NULL" password="NULL" apn_type="default"/></lynq_qser_data_apn>
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/makefile
new file mode 100644
index 0000000..c3bfba0
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/makefile
@@ -0,0 +1,69 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+ -std=gnu++14 \
+ -g -Os \
+ -flto \
+ -fPIC \
+ -fpermissive \
+
+ifeq ($(strip $(TARGET_PLATFORM)), T106)
+LOCAL_CFLAGS += -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+endif
+
+$(warning ################# lynq qser sms demo ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH = .
+
+LOCAL_C_INCLUDES = \
+ -I. \
+ -I$(LOCAL_PATH)/include/ \
+ -I$(ROOT)$(includedir)/logger \
+ -I$(ROOT)$(includedir)/liblog \
+ -I$(ROOT)$(includedir)/libdata \
+ -I$(ROOT)$(includedir)/libxml2 \
+
+
+LOCAL_LIBS := \
+ -L. \
+ -lstdc++ \
+ -lcutils \
+ -lutils \
+ -lpthread \
+ -llynq-log \
+ -llynq-data \
+ -lxml2 \
+
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-qser-data.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+
+.PHONY: build clean install pack_rootfs
+all: build
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+ $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+build: $(EXECUTABLE)
+ $(warning ########## build $(EXECUTABLE) ##########)
+install:
+ mkdir -p $(ROOT)$(base_libdir)/
+ install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+ mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+pack_rootfs:
+ mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+ mkdir -p $(PACK_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(EXECUTABLE)
+ -find . -name "*.o" -delete
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h
new file mode 100755
index 0000000..0192db5
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/include/lynq_qser_sim.h
@@ -0,0 +1,382 @@
+#ifndef __LYNQ_QSER_SIM__
+#define __LYNQ_QSER_SIM__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define QSER_SIM_IMSI_LEN_MAX 16 /** Maximum length of IMSI data. */
+#define QSER_SIM_ICCID_LEN_MAX 20 /** Maximum length of ICCID data. */
+
+typedef enum
+{
+ E_QSER_SUCCESS = 0, /**< Success. */
+ E_QSER_ERROR_BADPARM = 4, /**< Bad parameter. */
+}E_QSER_ERROR_CODE_T;
+
+typedef uint32_t sim_client_handle_type;
+
+typedef enum
+{
+ QSER_SIM_SLOT_ID_1 = 0xB01, /**< Identify card in slot 1. */
+ QSER_SIM_SLOT_ID_2 = 0xB02, /**< Identify card in slot 2. */
+}QSER_SIM_SLOT_ID_TYPE_T;
+
+typedef enum
+{
+ QSER_SIM_APP_TYPE_UNKNOWN = 0xB00, /**< Unknown application type */
+ QSER_SIM_APP_TYPE_3GPP = 0xB01, /**< Identify the SIM/USIM application on the card. */
+ QSER_SIM_APP_TYPE_3GPP2 = 0xB02, /**< Identify the RUIM/CSIM application on the card. */
+ QSER_SIM_APP_TYPE_ISIM = 0xB03, /**< Identify the ISIM application on the card. */
+}QSER_SIM_APP_TYPE_T;
+
+typedef struct
+{
+ QSER_SIM_SLOT_ID_TYPE_T e_slot_id; /**< Indicates the slot to be used. */
+ QSER_SIM_APP_TYPE_T e_app; /**< Indicates the type of the application. */
+}QSER_SIM_APP_ID_INFO_T; /* Type */
+
+#define QSER_SIM_PIN_LEN_MAX 8 /** Maximum length of PIN data. */
+
+typedef enum
+{
+ QSER_SIM_PIN_ID_1 = 0xB01, /**< Level 1 user verification. */
+ QSER_SIM_PIN_ID_2 = 0xB02, /**< Level 2 user verification. */
+}QSER_SIM_PIN_ID_TYPE_T;
+
+typedef struct
+{
+ QSER_SIM_APP_ID_INFO_T app_info; /**< Application identification information. */
+ QSER_SIM_PIN_ID_TYPE_T pin_id; /**< PIN ID. */
+ uint32_t pin_value_len; /**< Must be set to the number of elements in pin_value. */
+ char pin_value[QSER_SIM_PIN_LEN_MAX]; /* Value of the PIN */
+}QSER_SIM_VERIFY_PIN_INFO_T;
+
+/** Changes the PIN value of an application. The application must pass both the
+ new and the old values of the PIN to complete the operation.
+ The same PIN can be used by multiple sessions (i.e., the PIN is shared
+ between GSM and RUIM in an ICC card). The PIN is automatically verified
+ for all the sessions when the command is executed. */
+typedef struct
+{
+ QSER_SIM_APP_ID_INFO_T app_info; /**< Application identification information. */
+ QSER_SIM_PIN_ID_TYPE_T pin_id; /**< PIN ID. */
+ uint32_t old_pin_value_len; /**< Must be set to the number of elements in old_pin_value. */
+ char old_pin_value[QSER_SIM_PIN_LEN_MAX]; /**< Value of the old PIN as a sequence of ASCII characters. */
+ uint32_t new_pin_value_len; /**< Must be set to the number of elements in new_pin_value. */
+ char new_pin_value[QSER_SIM_PIN_LEN_MAX]; /**< Value of the new PIN as a sequence of ASCII characters. */
+}QSER_SIM_CHANGE_PIN_INFO_T;
+
+/** Unblocks a blocked PIN using the PUK code. The client must pass PUK1 to unblock PIN1 or PUK2 to unblock PIN2.
+ The same PIN can be used by multiple sessions (i.e., the PIN is shared between GSM and RUIM in an ICC card).
+ The PIN is automatically verified for all the sessions when the command is executed. */
+typedef struct
+{
+ QSER_SIM_APP_ID_INFO_T app_info; /**< Application identification information. */
+ QSER_SIM_PIN_ID_TYPE_T pin_id; /**< PIN ID. */
+ uint32_t puk_value_len; /**< Must be set to the number of elements in puk_value. */
+ char puk_value[QSER_SIM_PIN_LEN_MAX]; /**< Value of the PUK as a sequence of ASCII characters. */
+ uint32_t new_pin_value_len; /**< Must be set to the number of elements in new_pin_value. */
+ char new_pin_value[QSER_SIM_PIN_LEN_MAX]; /**< Value of the new PIN as a sequence of ASCII characters. */
+}QSER_SIM_UNBLOCK_PIN_INFO_T;
+
+/** Enables the PIN on an application. */
+typedef QSER_SIM_VERIFY_PIN_INFO_T QSER_SIM_ENABLE_PIN_INFO_T; //Same
+
+/** Disables the PIN of an application, */
+typedef QSER_SIM_VERIFY_PIN_INFO_T QSER_SIM_DISABLE_PIN_INFO_T; //Same
+
+
+typedef enum
+{
+ QSER_SIM_PERSO_FEATURE_TYPE_UNKNOWN = 0xB00, /**< Unknown personalization feature. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP_NETWORK = 0xB01, /**< Featurization based on 3GPP MCC and MNC. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP_NETWORK_SUBSET = 0xB02, /**< Featurization based on 3GPP MCC, MNC, and IMSI digits 6 and 7. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP_SERVICE_PROVIDER = 0xB03, /**< Featurization based on 3GPP MCC, MNC, and GID1. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP_CORPORATE = 0xB04, /**< Featurization based on 3GPP MCC, MNC, GID1, and GID2. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP_SIM = 0xB05, /**< Featurization based on the 3GPP IMSI. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP2_NETWORK_TYPE_1 = 0xB06, /**< Featurization based on 3GPP2 MCC and MNC. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP2_NETWORK_TYPE_2 = 0xB07, /**< Featurization based on 3GPP2 IRM code. */
+ QSER_SIM_PERSO_FEATURE_TYPE_3GPP2_RUIM = 0xB08, /**< Featurization based on 3GPP2 IMSI_M. */
+}QSER_SIM_PERSO_FEATURE_TYPE_T;
+
+typedef enum
+{
+ QSER_SIM_CARD_STATE_UNKNOWN = 0xB01, /**< Card state unknown. */
+ QSER_SIM_CARD_STATE_ABSENT = 0xB02, /**< Card is absent. */
+ QSER_SIM_CARD_STATE_PRESENT = 0xB03, /**< Card is present. */
+ QSER_SIM_CARD_STATE_ERROR_UNKNOWN = 0xB04, /**< Unknown error state. */
+ QSER_SIM_CARD_STATE_ERROR_POWER_DOWN = 0xB05, /**< Power down. */
+ QSER_SIM_CARD_STATE_ERROR_POLL_ERROR = 0xB06, /**< Poll error. */
+ QSER_SIM_CARD_STATE_ERROR_NO_ATR_RECEIVED = 0xB07, /**< Failed to receive an answer to reset. */
+ QSER_SIM_CARD_STATE_ERROR_VOLT_MISMATCH = 0xB08, /**< Voltage mismatch. */
+ QSER_SIM_CARD_STATE_ERROR_PARITY_ERROR = 0xB09, /**< Parity error. */
+ QSER_SIM_CARD_STATE_ERROR_SIM_TECHNICAL_PROBLEMS= 0xB0A, /**< Card returned technical problems. */
+}QSER_SIM_CARD_STATE_TYPE_T; /**< Card state. */
+
+typedef enum
+{
+ QSER_SIM_CARD_TYPE_UNKNOWN = 0xB00, /**< Unidentified card type. */
+ QSER_SIM_CARD_TYPE_ICC = 0xB01, /**< Card of SIM or RUIM type. */
+ QSER_SIM_CARD_TYPE_UICC = 0xB02, /**< Card of USIM or CSIM type. */
+}QSER_SIM_CARD_TYPE_T;
+
+typedef enum
+{
+ QSER_SIM_PROV_STATE_NONE = 0xB00, /**< Nonprovisioning. */
+ QSER_SIM_PROV_STATE_PRI = 0xB01, /**< Primary provisioning subscription. */
+ QSER_SIM_PROV_STATE_SEC = 0xB02, /**< Secondary provisioning subscription. */
+}QSER_SIM_SUBSCRIPTION_TYPE_T;
+
+typedef enum
+{
+ QSER_SIM_APP_STATE_UNKNOWN = 0xB00, /**< Application state unknown. */
+ QSER_SIM_APP_STATE_DETECTED = 0xB01, /**< Detected state. */
+ QSER_SIM_APP_STATE_PIN1_REQ = 0xB02, /**< PIN1 required. */
+ QSER_SIM_APP_STATE_PUK1_REQ = 0xB03, /**< PUK1 required. */
+ QSER_SIM_APP_STATE_INITALIZATING = 0xB04, /**< Initializing. */
+ QSER_SIM_APP_STATE_PERSO_CK_REQ = 0xB05, /**< Personalization control key required. */
+ QSER_SIM_APP_STATE_PERSO_PUK_REQ = 0xB06, /**< Personalization unblock key required. */
+ QSER_SIM_APP_STATE_PERSO_PERMANENTLY_BLOCKED= 0xB07, /**< Personalization is permanently blocked. */
+ QSER_SIM_APP_STATE_PIN1_PERM_BLOCKED = 0xB08, /**< PIN1 is permanently blocked. */
+ QSER_SIM_APP_STATE_ILLEGAL = 0xB09, /**< Illegal application state. */
+ QSER_SIM_APP_STATE_READY = 0xB0A, /**< Application ready state. @newpage */
+}QSER_SIM_APP_STATE_TYPE_T;
+
+typedef enum
+{
+ QSER_SIM_PIN_STATE_UNKNOWN = 0xB01, /**< Unknown PIN state. */
+ QSER_SIM_PIN_STATE_ENABLED_NOT_VERIFIED = 0xB02, /**< PIN required, but has not been verified. */
+ QSER_SIM_PIN_STATE_ENABLED_VERIFIED = 0xB03, /**< PIN required and has been verified. */
+ QSER_SIM_PIN_STATE_DISABLED = 0xB04, /**< PIN not required. */
+ QSER_SIM_PIN_STATE_BLOCKED = 0xB05, /**< PIN verification has failed too many times and is blocked. Recoverable through PUK verification. */
+ QSER_SIM_PIN_STATE_PERMANENTLY_BLOCKED = 0xB06, /**< PUK verification has failed too many times and is not recoverable. */
+}QSER_SIM_PIN_STATE_TYPE_T;
+
+typedef struct
+{
+ QSER_SIM_SUBSCRIPTION_TYPE_T subscription; /**< Type of subscription (i.e., primary, secondary, etc.). */
+ QSER_SIM_APP_STATE_TYPE_T app_state; /**< Current state of the application. */
+ QSER_SIM_PERSO_FEATURE_TYPE_T perso_feature; /**< Current personalization state and feature enabled. */
+ uint8_t perso_retries; /**< Number of personalization retries. */
+ uint8_t perso_unblock_retries; /**< Number of personalization unblock retries. */
+ QSER_SIM_PIN_STATE_TYPE_T pin1_state; /**< Current PIN 1 state. */
+ uint8_t pin1_num_retries; /**< Number of PIN 1 retries. */
+ uint8_t puk1_num_retries; /**< Number of PUK 1 retries. */
+ QSER_SIM_PIN_STATE_TYPE_T pin2_state; /**< Current PIN 2 state. */
+ uint8_t pin2_num_retries; /**< Number of PIN 2 retries. */
+ uint8_t puk2_num_retries; /**< Number of PUK 2 retries. */
+}QSER_SIM_CARD_APP_INFO_T;
+
+typedef struct
+{
+ QSER_SIM_CARD_APP_INFO_T app_3gpp; /**< Stores 3GPP application information. */
+ QSER_SIM_CARD_APP_INFO_T app_3gpp2; /**< Stores 3GPP2 application information. */
+ QSER_SIM_CARD_APP_INFO_T app_isim; /**< Stores ISIM application information. */
+}QSER_SIM_CARD_ALL_APP_INFO_T;
+
+typedef struct
+{
+ QSER_SIM_CARD_STATE_TYPE_T e_card_state;/**< Current card and card error state. */
+ QSER_SIM_CARD_TYPE_T e_card_type; /**< Card type. */
+ QSER_SIM_CARD_ALL_APP_INFO_T card_app_info; /**< Stores all relevant application information. */
+}QSER_SIM_CARD_STATUS_INFO_T;
+
+int qser_sim_client_init(sim_client_handle_type *ph_sim);
+
+int qser_sim_client_deinit(sim_client_handle_type h_sim);
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_getimsi
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to retrieve the IMSI (for 3GPP)
+ or IMSI_M (for 3GPP2) from the SIM in ASCII form
+
+ @return
+ void
+*/
+/*=========================================================================*/
+int qser_sim_getimsi(
+ sim_client_handle_type h_sim,
+ QSER_SIM_APP_ID_INFO_T *pt_info, ///< [IN] The SIM identifier info.
+ char *imsi, ///< [OUT] IMSI buffer
+ size_t imsiLen ///< [IN] IMSI buffer length
+);
+
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_geticcid
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to retrieve the ICCID from
+ SIM in ASCII form
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_geticcid
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_SLOT_ID_TYPE_T simId, ///< [IN] The SIM identifier.
+ char *iccid, ///< [OUT] ICCID
+ size_t iccidLen ///< [IN] ICCID buffer length
+);
+
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_getphonenumber
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to retrieve the device phone
+ number from MSISDN (for 3GPP) or MDN (for 3GPP2) from the SIM in
+ ASCII form
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_getphonenumber
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_APP_ID_INFO_T *pt_info, ///< [IN] The SIM identifier.
+ char *phone_num, ///< [OUT] phone number
+ size_t phoneLen ///< [IN] phone number buffer length
+);
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_verifypin
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to verify either PIN1 or PIN2
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_verifypin
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_VERIFY_PIN_INFO_T *pt_info ///< [IN] Verify PIN infor
+);
+
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_changepin
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to change the value of
+ either PIN1 or PIN2
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_changepin
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_CHANGE_PIN_INFO_T *pt_info ///< [IN] Change PIN infor
+);
+
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_unblockpin
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to unblock a PIN1 or PIN2 that
+ has been blocked
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_unblockpin
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_UNBLOCK_PIN_INFO_T *pt_info ///< [IN] Unblock PIN infor
+);
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_enablepin
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to enable PIN1 or PIN2
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_enablepin
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_ENABLE_PIN_INFO_T *pt_info ///< [IN] Enable PIN infor
+);
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_disablepin
+
+===========================================================================*/
+/*
+ @brief
+ Function sends a command to the modem to disable PIN1 or PIN2
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_disablepin
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_DISABLE_PIN_INFO_T *pt_info ///< [IN] Disable PIN infor
+);
+
+
+/*===========================================================================
+
+ FUNCTION: qser_sim_getcardstatus
+
+===========================================================================*/
+/*
+ @brief
+ Function retrieves the server cached card status informations and
+ sends the information to the client
+
+ @return
+ int
+*/
+/*=========================================================================*/
+int qser_sim_getcardstatus
+(
+ sim_client_handle_type h_sim,
+ QSER_SIM_SLOT_ID_TYPE_T simId, ///< [IN] The SIM identifier.
+ QSER_SIM_CARD_STATUS_INFO_T *pt_info ///< [OUT] Cart status infor output
+);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/lynq_qser_sim.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/lynq_qser_sim.cpp
new file mode 100755
index 0000000..6416d9e
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/lynq_qser_sim.cpp
@@ -0,0 +1,183 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <sys/types.h>
+#include <string.h>
+#include <unistd.h>
+#include <log/log.h>
+#include <include/lynq_sim.h>
+#include <stdlib.h>
+#include <pthread.h>
+#include <liblog/lynq_deflog.h>
+#include "lynq_qser_sim.h"
+
+#define USER_LOG_TAG "LYNQ_QSER_SIM"
+
+sim_client_handle_type h_sim = 0;
+
+int qser_sim_client_init(sim_client_handle_type *ph_sim)
+{
+ if(NULL == ph_sim)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ *ph_sim = (sim_client_handle_type)getpid();
+ //*ph_sim = (sim_client_handle_type)53234323;
+ h_sim = *ph_sim;
+ return lynq_sim_init(*ph_sim);
+}
+
+int qser_sim_client_deinit(sim_client_handle_type h_sim)
+{
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_sim_deinit();
+}
+
+int qser_sim_getimsi(sim_client_handle_type h_sim, QSER_SIM_APP_ID_INFO_T *pt_info, char *imsi, size_t imsiLen)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(NULL == imsi)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_get_imsi(imsi);
+}
+
+int qser_sim_geticcid(sim_client_handle_type h_sim, QSER_SIM_SLOT_ID_TYPE_T simId, char *iccid, size_t iccidLen)
+{
+ if(NULL == iccid)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_get_iccid(iccid);
+}
+
+int qser_sim_getphonenumber(sim_client_handle_type h_sim, QSER_SIM_APP_ID_INFO_T *pt_info, char *phone_num, size_t phoneLen)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(NULL == phone_num)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_query_phone_number(phone_num);
+}
+
+int qser_sim_verifypin(sim_client_handle_type h_sim, QSER_SIM_VERIFY_PIN_INFO_T *pt_info)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_verify_pin(pt_info->pin_value);
+}
+
+int qser_sim_changepin(sim_client_handle_type h_sim,QSER_SIM_CHANGE_PIN_INFO_T *pt_info)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_change_pin(pt_info->old_pin_value, pt_info->new_pin_value);
+}
+
+int qser_sim_unblockpin(sim_client_handle_type h_sim, QSER_SIM_UNBLOCK_PIN_INFO_T *pt_info)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_unlock_pin(pt_info->puk_value, pt_info->new_pin_value);
+}
+
+int qser_sim_enablepin(sim_client_handle_type h_sim, QSER_SIM_ENABLE_PIN_INFO_T *pt_info)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_enable_pin(pt_info->pin_value);
+}
+
+int qser_sim_disablepin(sim_client_handle_type h_sim, QSER_SIM_DISABLE_PIN_INFO_T *pt_info)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_disable_pin(pt_info->pin_value);
+}
+
+int qser_sim_getcardstatus(sim_client_handle_type h_sim,QSER_SIM_SLOT_ID_TYPE_T simId, QSER_SIM_CARD_STATUS_INFO_T *pt_info)
+{
+ if(NULL == pt_info)
+ {
+ LYERRLOG("input error\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ if(h_sim == 0)
+ {
+ LYERRLOG("not init\n");
+ return E_QSER_ERROR_BADPARM;
+ }
+ return lynq_get_sim_status((int*)&pt_info->e_card_state);
+}
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/makefile
new file mode 100755
index 0000000..cafc77c
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sim/makefile
@@ -0,0 +1,65 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+ -std=gnu++14 \
+ -g -Os \
+ -flto \
+ -fPIC \
+ -DECALL_SUPPORT \
+ -fpermissive \
+
+
+
+$(warning ################# lynq qser sms demo ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH = .
+
+LOCAL_C_INCLUDES = \
+ -I. \
+ -I$(LOCAL_PATH)/include/ \
+ -I$(ROOT)$(includedir)/logger \
+ -I$(ROOT)$(includedir)/liblog \
+
+LOCAL_LIBS := \
+ -L. \
+ -ldl \
+ -lstdc++ \
+ -lcutils \
+ -lutils \
+ -lpthread \
+ -llynq-log \
+ -llynq-sim \
+
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-qser-sim.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+
+.PHONY: build clean install pack_rootfs
+all: build
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+ $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+build: $(EXECUTABLE)
+ $(warning ########## build $(EXECUTABLE) ##########)
+install:
+ mkdir -p $(ROOT)$(base_libdir)/
+ install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+ mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+pack_rootfs:
+ mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+ mkdir -p $(PACK_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(EXECUTABLE)
+ -find . -name "*.o" -delete
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h
new file mode 100755
index 0000000..5f0f0c3
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/include/lynq_qser_sms.h
@@ -0,0 +1,241 @@
+#ifndef LYNQ_QSER_SMS_H
+#define LYNQ_QSER_SMS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+
+
+#define MIN_MSM_PARAM_NUM 4
+#define MIN_IMS_MSM_PARAM_NUM 6
+#define MIN_WRITMSM_PARAM_NUM 5
+#define MSG_MAX_LEN 1024
+#define TELEPHONNUM_LEN 64
+#define STORAGSMS_MAX_SIZE 128
+#define SMSC_MAX_LEN 22
+#define SMS_NUM_MAX 255
+
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef uint32_t sms_client_handle_type;
+
+/** Maximum length of an SMS. */
+#define QSER_SMS_MAX_MT_MSG_LENGTH 1440
+
+/** Maximum string length. */
+#define QSER_SMS_MAX_ADDR_LENGTH 252
+
+/** Maximum string length. */
+#define QSER_SMS_MAX_SCA_TYPLENGTH 3
+
+typedef enum
+{
+ QSER_SMS_7BIT = 0,
+ QSER_SMS_8BIT = 1,
+ QSER_SMS_UCS2 = 2,
+ //<2017/12/28-QCM9XOL00004C001-P01-Vicent.Gao, <[SMS] Segment 1==> CharSet to Alpha implementation.>
+ QSER_SMS_IRA = 3,
+ //>2017/12/28-QCM9XOL00004C001-P01-Vicent.Gao
+
+}QSER_SMS_T;
+
+typedef enum
+{
+ QSER_SMS_MO = 0, ///< SMS mobile terminated message.
+ QSER_SMS_MT = 1, ///< SMS mobile originated message.
+ QSER_SMS_BROADCAST_MT = 2 ///< SMS Cell Broadcast message.
+}QSER_SMS_TYPT;
+
+typedef enum
+{
+ QSER_SMS_STORAGTYPNONE = -1, /**< Message no need to store. */
+ QSER_SMS_STORAGTYPUIM = 0, /**< Message store to UIM. */
+ QSER_SMS_STORAGTYPNV = 1, /**< Message store to NV. */
+ QSER_SMS_STORAGTYPDB = 2, /**< Message store to NV. */
+}QSER_SMS_STORAGTYPT;
+
+typedef enum
+{
+ QSER_SMS_MESSAGMODUNKNOWN = -1, /**< Message type CDMA */
+ QSER_SMS_MESSAGMODCDMA = 0, /**< Message type CDMA */
+ QSER_SMS_MESSAGMODGW = 1, /**< Message type GW. */
+}QSER_SMS_MODTYPT;
+
+typedef struct
+ {
+ uint8_t total_segments; /**< The number of long short message*/
+ uint8_t seg_number; /**< Current number.*/
+ uint8_t referencnumber; /**< referencnumber.*/
+}QSER_sms_user_data_head_t;
+
+typedef struct
+{
+ /* If sms is stored, it won't parse, you need read it by yourself */
+ QSER_SMS_STORAGTYPT storage; ///specify where stored this msg
+
+ QSER_SMS_T format;
+ QSER_SMS_TYPT type;
+ char src_addr[QSER_SMS_MAX_ADDR_LENGTH]; ///Telephone number string.
+ int sms_data_len;
+ char sms_data[QSER_SMS_MAX_MT_MSG_LENGTH]; ///SMS content, data format depends on format
+ char timestamp[21]; ///Message time stamp (in text mode). string format: "yy/MM/dd,hh:mm:ss+/-TimeZone"
+ uint8_t user_data_head_valid; //indicate whether long sms. TRUE-long sms; FALSE-short message;
+ QSER_sms_user_data_head_t user_data_head; //long sms user data head info.
+ QSER_SMS_MODTYPT mode; ///specify where stored this msg cdma or gw area
+ uint32_t storage_index; ///storage index, -1 means not store
+} QSER_sms_info_t;
+
+typedef struct
+{
+ QSER_SMS_STORAGTYPT storage;
+ QSER_SMS_MODTYPT mode;
+ uint32_t storage_idx;
+} QSER_sms_storage_info_t;
+
+typedef enum
+{
+ QSER_SMS_UNKNOWN = -1,
+ QSER_SMS_DISCARD = 0x00, /* Incoming messages for this route are discarded by the WMS service without
+ notifying QMI_WMS clients */
+ QSER_SMS_STORAND_NOTIFY = 0x01, /* Incoming messages for this route are stored to the specified device
+ memory, and new message notifications */
+ QSER_SMS_TRANSFER_ONLY = 0x02, /* Incoming messages for this route are transferred to the client, and the
+ client is expected to send ACK to the network */
+ QSER_SMS_TRANSFER_AND_ACK = 0x03, /* Incoming messages for this route are transferred to the client, and ACK is
+ sent to the network */
+}QSER_SMS_RECEPTION_ACTION_TYPT;
+
+#define QSER_WMS_MESSAGLENGTH_MAX 255
+
+typedef enum
+ {
+ QSER_WMS_MESSAGCDMA = 0x00, //- 0x00 -- MESSAGCDMA -- CDMA \n
+ QSER_WMS_MESSAGGW_PP = 0x06, //- 0x06 -- MESSAGGW_PP -- GW_PP
+}QSER_WMS_MESSAGTYPE;
+
+
+typedef struct
+ {
+ QSER_WMS_MESSAGTYPE format;
+ uint32_t raw_messaglen; /**< Must be set to # of elements in raw_message */
+ uint8_t raw_message[QSER_WMS_MESSAGLENGTH_MAX]; /**< Raw message data*/
+}QSER_wms_send_raw_message_data_t;
+
+typedef enum
+{
+ QSER_WMS_TL_CAUSCODADDR_VACANT = 0x00,
+ QSER_WMS_TL_CAUSCODADDR_TRANSLATION_FAILURE = 0x01,
+ QSER_WMS_TL_CAUSCODNETWORK_RESOURCSHORTAGE = 0x02,
+ QSER_WMS_TL_CAUSCODNETWORK_FAILURE = 0x03,
+ QSER_WMS_TL_CAUSCODINVALID_TELESERVICID = 0x04,
+ QSER_WMS_TL_CAUSCODNETWORK_OTHER = 0x05,
+ QSER_WMS_TL_CAUSCODNO_PAGRESPONSE = 0x20,
+ QSER_WMS_TL_CAUSCODDEST_BUSY = 0x21,
+ QSER_WMS_TL_CAUSCODNO_ACK = 0x22,
+ QSER_WMS_TL_CAUSCODDEST_RESOURCSHORTAGE = 0x23,
+ QSER_WMS_TL_CAUSCODSMS_DELIVERY_POSTPONED = 0x24,
+ QSER_WMS_TL_CAUSCODDEST_OUT_OF_SERV = 0x25,
+ QSER_WMS_TL_CAUSCODDEST_NOT_AT_ADDR = 0x26,
+ QSER_WMS_TL_CAUSCODDEST_OTHER = 0x27,
+ QSER_WMS_TL_CAUSCODRADIO_IF_RESOURCSHORTAGE = 0x40,
+ QSER_WMS_TL_CAUSCODRADIO_IF_INCOMPATABILITY = 0x41,
+ QSER_WMS_TL_CAUSCODRADIO_IF_OTHER = 0x42,
+ QSER_WMS_TL_CAUSCODENCODING = 0x60,
+ QSER_WMS_TL_CAUSCODSMS_ORIG_DENIED = 0x61,
+ QSER_WMS_TL_CAUSCODSMS_TERM_DENIED = 0x62,
+ QSER_WMS_TL_CAUSCODSUPP_SERV_NOT_SUPP = 0x63,
+ QSER_WMS_TL_CAUSCODSMS_NOT_SUPP = 0x64,
+ QSER_WMS_TL_CAUSCODMISSING_EXPECTED_PARAM = 0x65,
+ QSER_WMS_TL_CAUSCODMISSING_MAND_PARAM = 0x66,
+ QSER_WMS_TL_CAUSCODUNRECOGNIZED_PARAM_VAL = 0x67,
+ QSER_WMS_TL_CAUSCODUNEXPECTED_PARAM_VAL = 0x68,
+ QSER_WMS_TL_CAUSCODUSER_DATA_SIZERR = 0x69,
+ QSER_WMS_TL_CAUSCODGENERAL_OTHER = 0x6A,
+}QSER_WMS_TL_CAUSCODTYPE;
+
+
+
+typedef struct
+ {
+ uint16_t messagid; /* Message ID */
+ uint8_t causcodvalid; /**< Must be set to true if causcode is being passed */
+ QSER_WMS_TL_CAUSCODTYPE causcode;
+}QSER_wms_raw_send_resp_t;
+
+typedef struct
+ {
+ char service_center_addr[QSER_SMS_MAX_ADDR_LENGTH + 1]; /**< Address of the service center.*/
+ uint8_t service_center_addr_typvalid;
+ char service_center_addr_type[QSER_SMS_MAX_SCA_TYPLENGTH + 1]; /**< 129 if the SMSC address does not start with a "+" characte;
+ 145 if the SMSC address starts with a "+" character*/
+}QSER_sms_service_center_cfg_t;
+
+typedef QSER_sms_info_t QSER_SMS_Msg_t;
+typedef QSER_sms_info_t* QSER_SMS_MsgRef;
+
+/* Callback function registered to qser_sms_addrxmsghandler, msgRef contains the detail msg infor */
+typedef void (*QSER_SMS_RxMsgHandlerFunc_t)(QSER_SMS_MsgRef msgRef, void* contextPtr);
+
+/* Init SMS module and return h_sms, this should be called before any othe ones */
+int qser_sms_client_init(sms_client_handle_type *ph_sms);
+
+/* Add callback function, if any new msg arrived, it will notify app */
+int qser_sms_addrxmsghandler(QSER_SMS_RxMsgHandlerFunc_t handlerPtr, void* contextPtr);
+
+/* Send sms, you just need to fill format/src_addr/sms_data_len/sms_data,
+ if format is UCS2, the data should be Unicode-BE format.
+*/
+int qser_sms_send_sms(sms_client_handle_type h_sms, QSER_sms_info_t *pt_sms_info);
+
+/* DeInit SMS module and release resource, this should be called in the last one. */
+int qser_sms_client_deinit(sms_client_handle_type h_sms);
+
+/* Delete the SMS specified in the pt_sms_storage */
+int qser_sms_deletefromstorage(sms_client_handle_type h_sms, QSER_sms_storage_info_t *pt_sms_storage);
+
+/* Send sms PDU.
+*/
+int qser_sms_send_smspdu( sms_client_handle_type h_sms,
+ QSER_wms_send_raw_message_data_t *raw_messagdata,
+ QSER_wms_raw_send_resp_t *rawresp);
+
+
+/* Get sms center address.
+*/
+int qser_sms_getsmscenteraddress( sms_client_handle_type h_sms,
+ QSER_sms_service_center_cfg_t *set_sca_cfg);
+
+/* Set sms center address.
+*/
+int qser_sms_setsmscenteraddress( sms_client_handle_type h_sms,
+ QSER_sms_service_center_cfg_t *get_sca_cfg);
+
+/*
+Usage 1 (register callback and wait for new sms arrive):
+1, qser_sms_client_init
+2, qser_sms_addrxmsghandler(pf_cb)
+3, wait for sms arrive, pf_cb will pass the detail sms info to app.
+4, qser_sms_client_deinit
+
+
+Usage 2 (Send sms):
+1, qser_sms_client_init
+2, qser_sms_addrxmsghandler(pf_cb)
+3, qser_sms_send_sms
+4, qser_sms_client_deinit
+
+
+Usage 3 (store sms):
+1, qser_sms_client_init
+2, qser_sms_addrxmsghandler(pf_cb)
+3, qser_sms_setroutelist (Notice: class-0 not allowed to store, class-2 must be stored to UIM)
+4, pf_cb will be called when new sms arrived, and tell you where the sms stored
+5, you can call qser_sms_deletefromstorage to delete specified sms, the location can be got from pf_cb.
+6, qser_sms_client_deinit
+*/
+
+#ifdef __cplusplus
+}
+#endif
+#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/lynq_qser_sms.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/lynq_qser_sms.cpp
new file mode 100755
index 0000000..5ff13a7
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/lynq_qser_sms.cpp
@@ -0,0 +1,195 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdint.h>
+#include <errno.h>
+#include <unistd.h>
+#include <liblog/lynq_deflog.h>
+#include <sys/types.h>
+#include <pthread.h>
+#include <libsms/lynq_sms.h>
+#include "lynq_qser_sms.h"
+#define USER_LOG_TAG "LYNQ_QSER_SMS"
+
+QSER_SMS_RxMsgHandlerFunc_t tmp = NULL;
+
+sms_client_handle_type h_sms = 0;
+
+enum{
+ SMS_OK = 0,
+ SMS_FAIL,
+ SMS_PARAM_ERR
+};
+
+void *new_sms_thread_recv(void *p)
+{
+ int handle = -1;
+ int status = -1;
+ int charset = -1;
+ char smsc[1024];
+ int smscLen = -1;
+ int smslen = -1;
+ char message[1024];
+ char teleNum[1024];
+ int numLen = -1;
+ int current = -1;
+ int total = -1;
+ QSER_sms_info_t QSER_sms_info;
+ while (1)
+ {
+ if(!lynq_wait_receive_new_sms(&handle))
+ {
+ if(!lynq_read_sms(handle,&status,&charset,smsc,&smscLen,&smslen,message,teleNum,&numLen,¤t,&total))
+ {
+ QSER_sms_info.storage_index = handle;
+ QSER_sms_info.format = (QSER_SMS_T)charset;
+ memcpy(QSER_sms_info.sms_data, message, smslen);
+ QSER_sms_info.sms_data[smslen] = '\0';
+ QSER_sms_info.sms_data_len = smslen;
+ if(total > 1)
+ {
+ QSER_sms_info.user_data_head_valid = 1;
+ }
+ else
+ {
+ QSER_sms_info.user_data_head_valid = 0;
+ }
+ tmp(&QSER_sms_info, &h_sms);
+ }
+ else
+ {
+ LYDBGLOG("lynq_read_sms error\n");
+ }
+ }
+ else
+ {
+ LYDBGLOG("lynq_wait_receive_new_sms error\n");
+ break;
+ }
+ }
+ return NULL;
+}
+
+int qser_sms_client_init(sms_client_handle_type *ph_sms)
+{
+ if(NULL == ph_sms)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ *ph_sms = (sms_client_handle_type)getpid();
+ h_sms = *ph_sms;
+ return lynq_sms_init(*ph_sms);
+}
+
+int qser_sms_client_deinit(sms_client_handle_type h_sms)
+{
+ if(h_sms == 0)
+ {
+ LYERRLOG("not init\n");
+ return SMS_PARAM_ERR;
+ }
+ return lynq_sms_deinit();
+}
+
+int qser_sms_send_sms(sms_client_handle_type h_sms, QSER_sms_info_t *pt_sms_info)
+{
+ if(NULL == pt_sms_info)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ if(h_sms == 0)
+ {
+ LYERRLOG("not init\n");
+ return SMS_PARAM_ERR;
+ }
+ return lynq_send_sms(pt_sms_info->src_addr, pt_sms_info->type, pt_sms_info->sms_data, pt_sms_info->sms_data_len);
+}
+
+int qser_sms_addrxmsghandler(QSER_SMS_RxMsgHandlerFunc_t handlerPtr, void* contextPtr)
+{
+ if(NULL == handlerPtr)
+ {
+ return SMS_PARAM_ERR;
+ }
+ if(NULL == contextPtr)
+ {
+ return SMS_PARAM_ERR;
+ }
+ tmp = handlerPtr;
+ pthread_t lynq_new_sms_tid = -1;
+ int rt = pthread_create(&lynq_new_sms_tid, NULL, new_sms_thread_recv, NULL);
+ if(rt < 0)
+ {
+ LYDBGLOG("qser_sms_addrxmsghandler pthread_create error!!!\n");
+ return -1;
+ }
+ return SMS_OK;
+}
+
+int qser_sms_deletefromstorage(sms_client_handle_type h_sms, QSER_sms_storage_info_t *pt_sms_storage)
+{
+ if(NULL == pt_sms_storage)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ if(h_sms == 0)
+ {
+ LYERRLOG("not init\n");
+ return SMS_PARAM_ERR;
+ }
+ return lynq_delete_sms(pt_sms_storage->storage_idx);
+}
+
+int qser_sms_send_smspdu(sms_client_handle_type h_sms, QSER_wms_send_raw_message_data_t *raw_messagdata, QSER_wms_raw_send_resp_t *rawresp)
+{
+ if(NULL == raw_messagdata)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ if(NULL == rawresp)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ if(h_sms == 0)
+ {
+ LYERRLOG("not init\n");
+ return SMS_PARAM_ERR;
+ }
+ LYERRLOG("not support\n");
+ return 0;
+}
+
+int qser_sms_getsmscenteraddress( sms_client_handle_type h_sms, QSER_sms_service_center_cfg_t *set_sca_cfg)
+{
+ if(NULL == set_sca_cfg)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ if(h_sms == 0)
+ {
+ LYERRLOG("not init\n");
+ return SMS_PARAM_ERR;
+ }
+ return lynq_get_smsc_address(set_sca_cfg->service_center_addr);
+}
+
+int qser_sms_setsmscenteraddress( sms_client_handle_type h_sms, QSER_sms_service_center_cfg_t *get_sca_cfg)
+{
+ if(NULL == get_sca_cfg)
+ {
+ LYERRLOG("input error\n");
+ return SMS_PARAM_ERR;
+ }
+ if(h_sms == 0)
+ {
+ LYERRLOG("not init\n");
+ return SMS_PARAM_ERR;
+ }
+ return lynq_set_smsc_address(get_sca_cfg->service_center_addr);
+}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/makefile
new file mode 100755
index 0000000..82a52b4
--- /dev/null
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-sms/makefile
@@ -0,0 +1,65 @@
+SHELL = /bin/sh
+RM = rm -f
+
+LOCAL_CFLAGS := -Wall \
+ -std=gnu++14 \
+ -g -Os \
+ -flto \
+ -fPIC \
+ -fpermissive \
+
+
+
+$(warning ################# lynq qser sms demo ROOT: $(ROOT),includedir:$(includedir))
+LOCAL_PATH = .
+
+LOCAL_C_INCLUDES = \
+ -I. \
+ -I$(LOCAL_PATH)/include/ \
+ -I$(ROOT)$(includedir)/logger \
+ -I$(ROOT)$(includedir)/liblog \
+ -I$(ROOT)$(includedir)/libsms \
+
+
+LOCAL_LIBS := \
+ -L. \
+ -lstdc++ \
+ -lcutils \
+ -lutils \
+ -lpthread \
+ -llynq-log \
+ -llynq-sms \
+
+
+SOURCES = $(wildcard *.cpp)
+
+EXECUTABLE = liblynq-qser-sms.so
+
+OBJECTS=$(SOURCES:.cpp=.o)
+
+
+.PHONY: build clean install pack_rootfs
+all: build
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) -shared -Wl,--no-undefined $(OBJECTS) $(LOCAL_LIBS) $(LOCAL_CFLAGS) $(LOCAL_C_INCLUDES) -o $@
+
+%.o : %.cpp
+ $(CXX) $(LOCAL_C_INCLUDES) $(LOCAL_CFLAGS) $(LOCAL_LIBS) -o $@ -c $<
+
+build: $(EXECUTABLE)
+ $(warning ########## build $(EXECUTABLE) ##########)
+install:
+ mkdir -p $(ROOT)$(base_libdir)/
+ install $(EXECUTABLE) $(ROOT)$(base_libdir)/
+ mkdir -p $(ROOT)$(includedir)/$(NAME)/sdk
+pack_rootfs:
+ mkdir -p $(PACK_INITRAMFS_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_INITRAMFS_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_INITRAMFS_TO)$(base_libdir)/$(EXECUTABLE)
+ mkdir -p $(PACK_TO)$(base_libdir)/
+ cp -af $(EXECUTABLE) $(PACK_TO)$(base_libdir)/
+ $(CROSS)strip $(PACK_TO)$(base_libdir)/$(EXECUTABLE)
+.PHONY: clean
+clean:
+ $(RM) $(OBJECTS) $(EXECUTABLE)
+ -find . -name "*.o" -delete
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-sim/LICENSE b/cap/zx297520v3/src/lynq/lib/liblynq-sim/LICENSE
index 77f59ed..605b7ea 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-sim/LICENSE
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-sim/LICENSE
@@ -1,31 +1,31 @@
Copyright Statement:
-This software/firmware and related documentation ("MediaTek Software") are
+This software/firmware and related documentation ("MobileTek Software") are
protected under relevant copyright laws. The information contained herein is
-confidential and proprietary to MediaTek Inc. and/or its licensors. Without
-the prior written permission of MediaTek inc. and/or its licensors, any
-reproduction, modification, use or disclosure of MediaTek Software, and
+confidential and proprietary to MobileTek Inc. and/or its licensors. Without
+the prior written permission of MobileTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MobileTek Software, and
information contained herein, in whole or in part, shall be strictly
prohibited.
-MediaTek Inc. (C) 2015. All rights reserved.
+MobileTek Inc. (C) 2015. All rights reserved.
BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
-THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
-RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
-ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MobileTek SOFTWARE")
+RECEIVED FROM MobileTek AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MobileTek EXPRESSLY DISCLAIMS ANY AND ALL
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
-NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+NONINFRINGEMENT. NEITHER DOES MobileTek PROVIDE ANY WARRANTY WHATSOEVER WITH
RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
-INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+INCORPORATED IN, OR SUPPLIED WITH THE MobileTek SOFTWARE, AND RECEIVER AGREES
TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
-OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
-SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MobileTek
+SOFTWARE. MobileTek SHALL ALSO NOT BE RESPONSIBLE FOR ANY MobileTek SOFTWARE
RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
-STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
-ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
-RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
-MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
-CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MobileTek'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MobileTek SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MobileTek'S OPTION, TO REVISE OR REPLACE THE
+MobileTek SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MobileTek FOR SUCH MobileTek SOFTWARE AT ISSUE.
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-uci/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-uci/makefile
index 209bf03..f23e05e 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-uci/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-uci/makefile
@@ -54,6 +54,12 @@
OBJECTS=$(SOURCES:.c=.o)
+DATE_FMT = +%Y-%m-%d
+ifdef SOURCE_DATE_EPOCH
+ BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "$(DATE_FMT)" 2>/dev/null || date -u "$(DATE_FMT)")
+else
+ BUILD_DATE ?= $(shell date "$(DATE_FMT)")
+endif
.PHONY: build clean install pack_rootfs
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile
index 293cc82..2ec043b 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/makefile
@@ -27,7 +27,7 @@
-llynq-sms \
-llynq-network \
-llynq-data \
-
+ -llynq-sim \
SOURCES = main.cpp cc.cpp dispatch.cpp sms.cpp network.cpp data.cpp