platform/core/connectivity/bluetooth-frwk.git
3 years agoMesh: Add Node Reset API in FRWK 89/240989/1 accepted/tizen/unified/20200818.130013 submit/tizen/20200814.005814
Anupam Roy [Thu, 13 Aug 2020 10:23:08 +0000 (15:53 +0530)]
Mesh: Add Node Reset API in FRWK

Change-Id: I70a34fc3601861d383fb9c7a82028ce2ac45811b
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add support for Node Reset in OAL & HAL 88/240988/1
Anupam Roy [Thu, 13 Aug 2020 10:10:08 +0000 (15:40 +0530)]
Mesh: Add support for Node Reset in OAL & HAL

This patch adds HAL & OAL API's for remote
node reset functionality.

Change-Id: I6805c62e1edd1c3c1e9f1ec6c302df796a114986
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoReduce the predefined logic (PredefinedPreprocessor) 43/240843/1 accepted/tizen/unified/20200813.122623 submit/tizen/20200813.001605
DoHyun Pyun [Wed, 12 Aug 2020 05:37:18 +0000 (14:37 +0900)]
Reduce the predefined logic (PredefinedPreprocessor)

Change-Id: Idc1db93b8ab86ca21fd8b2a1f5d324646e057f0b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMerge "Fix SAM tool violations (GlobalVariable)" into tizen
Pyun DoHyun [Wed, 12 Aug 2020 04:16:04 +0000 (04:16 +0000)]
Merge "Fix SAM tool violations (GlobalVariable)" into tizen

3 years agoFix cleanup logic regarding notify fd 35/240835/1
Deokhyun Kim [Mon, 10 Aug 2020 07:57:01 +0000 (16:57 +0900)]
Fix cleanup logic regarding notify fd

Change-Id: I577cd0305e529d0dc259e4d38603ee3db5c2f08d
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix SAM tool violations (GlobalVariable) 32/240832/1
DoHyun Pyun [Wed, 12 Aug 2020 02:29:35 +0000 (11:29 +0900)]
Fix SAM tool violations (GlobalVariable)

Change-Id: I1c590603b570d6dc9d0628ba22c597f073215a9e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoSkip error handling in case of G_IO_NVAL, because the channel is invalid 34/240834/1
Deokhyun Kim [Fri, 7 Aug 2020 06:50:34 +0000 (15:50 +0900)]
Skip error handling in case of G_IO_NVAL, because the channel is invalid

Change-Id: I554ff309e0291b2e014e8e1d88eeaf957030019f
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoMesh: Implement Network Destroy Request 03/240803/1 accepted/tizen/unified/20200812.143918 submit/tizen/20200811.230110
Anupam Roy [Tue, 11 Aug 2020 14:05:36 +0000 (19:35 +0530)]
Mesh: Implement Network Destroy Request

This patch handles handles destroying the
network, by which local configuration client
will leave the Mesh Network. Both Stack &
FRWK will consequently remove the DB &
other configuration entries.

Change-Id: I58f567664c49633786f31c760a058889ba7d73b6
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMerge "Mesh: Fix provisioning and mesh message communication" into tizen
Pyun DoHyun [Mon, 10 Aug 2020 23:00:41 +0000 (23:00 +0000)]
Merge "Mesh: Fix provisioning and mesh message communication" into tizen

3 years agoMesh: Fix provisioning and mesh message communication 99/240699/1
Abhay Agarwal [Mon, 10 Aug 2020 13:08:00 +0000 (18:38 +0530)]
Mesh: Fix provisioning and mesh message communication

This patch fix
- Mesh provisioning of multiple devices
- Mesh model message response handler

Change-Id: I13a909ddf796206c193af41da3fe85a5eb0a592e
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoClear mesh event handlers in the mesh deinit time 95/240595/1
DoHyun Pyun [Mon, 10 Aug 2020 01:58:58 +0000 (10:58 +0900)]
Clear mesh event handlers in the mesh deinit time

Change-Id: I5c7bf72d4cf0930ff89ed4026ffdef9fa416bea2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: Error handling in Model Publication Status 69/240569/1
Anupam Roy [Fri, 7 Aug 2020 14:34:21 +0000 (20:04 +0530)]
Mesh: Error handling in Model Publication Status

This patch adds logic to send error event
to application, when error is
received in "Model Publication Status" event
from a node. For example, if provisioner
sends wrong appkey index, node will send
error to indicate operation is failed.

Change-Id: Iea91de2812876c18c830ee1b2d4e4b7d91b55929
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMerge "Add fd param to check fd is valid" into tizen
Pyun DoHyun [Thu, 6 Aug 2020 01:49:15 +0000 (01:49 +0000)]
Merge "Add fd param to check fd is valid" into tizen

3 years agoMerge "Modify the package version" into tizen
Pyun DoHyun [Thu, 6 Aug 2020 01:48:33 +0000 (01:48 +0000)]
Merge "Modify the package version" into tizen

3 years agoFix the 64bit build error 70/240370/1 accepted/tizen/unified/20200810.123222 submit/tizen/20200804.074118
DoHyun Pyun [Thu, 6 Aug 2020 01:19:15 +0000 (10:19 +0900)]
Fix the 64bit build error

error: format '%d' expects argument of type 'int', but argument 9 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]

Change-Id: I687a1a2603ddf8c9770d6699a045f1ee976ab63c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoAdd fd param to check fd is valid 94/240294/2
Wootak Jung [Wed, 5 Aug 2020 06:03:03 +0000 (15:03 +0900)]
Add fd param to check fd is valid

Change-Id: I4dbf3c8576b2b8df8146cfaeaa008e5efc89967d
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoModify the package version 36/240036/3
DoHyun Pyun [Mon, 3 Aug 2020 01:14:54 +0000 (10:14 +0900)]
Modify the package version

In order to distinguish the package history as tizen version,
we manage the package version from now.

Change-Id: I5d023755b527bbaf1e96f826e9037df497276518
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: Fix coding style 69/240169/1
Abhay Agarwal [Tue, 4 Aug 2020 05:37:12 +0000 (11:07 +0530)]
Mesh: Fix coding style

This patch handles following
- Fix style according to coding guidelines
- Rename few events

Change-Id: I63f059d203b0537d575d5e21ad7f35f3c834a9ce
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoMerge "Mesh: Fix issues in Mesh Model Subscrition" into tizen
Pyun DoHyun [Mon, 3 Aug 2020 00:50:30 +0000 (00:50 +0000)]
Merge "Mesh: Fix issues in Mesh Model Subscrition" into tizen

3 years agoMesh: Fix issues in Mesh Model Subscrition 16/240016/2
Anupam Roy [Fri, 31 Jul 2020 10:58:48 +0000 (16:28 +0530)]
Mesh: Fix issues in Mesh Model Subscrition

This patch fixes issues in following operations
- Get Mesh BT SIG & Vendor Model Subscription List
- Add missing Command timeout handling
- Fix gdbus data format for sending Model list
- Add missing privilege for Model Subscription List API

Change-Id: I671b3f109ae1b2c752115d30dcb26783e7133e1d
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Implement bluetooth service interface for model message 13/240013/1
Abhay Agarwal [Fri, 31 Jul 2020 03:21:49 +0000 (08:51 +0530)]
Mesh: Implement bluetooth service interface for model message

This patch implement bt-api and bt-service interface for mesh
model message comminications.

Change-Id: Ib7eed9cbce7c86ec204e87f64e495d08ca2026e9
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoMesh: Add mesh model support 12/240012/1
Abhay Agarwal [Fri, 31 Jul 2020 03:18:38 +0000 (08:48 +0530)]
Mesh: Add mesh model support

This patch add mesh model support in bluetooth service.
This interface can be used for mesh model communications.

Change-Id: I7cf6a2d896cfb06e5b31871eb356b2a0cbdc1bec
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoMesh: Add OAL interface for Mesh message execution 11/240011/1
Abhay Agarwal [Thu, 30 Jul 2020 16:56:47 +0000 (22:26 +0530)]
Mesh: Add OAL interface for Mesh message execution

Change-Id: Ib97aa28dd5b8fba288898f5e6763f9bb5997b057
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoMesh: Add HAL interface for Mesh messages 10/240010/1
Abhay Agarwal [Thu, 30 Jul 2020 16:56:28 +0000 (22:26 +0530)]
Mesh: Add HAL interface for Mesh messages

This patch introduces HAL interface which can be used
to send and receive mesh messages which needs to be
encrypted/decrypted using application key.

Change-Id: I19f603781eecb159c6eb2bd834fadbc08b65bd46
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoAdd the default deny rule for org.projectx.bt.mesh 45/239945/1 accepted/tizen/unified/20200803.122024 submit/tizen/20200731.001830
DoHyun Pyun [Fri, 31 Jul 2020 01:40:49 +0000 (10:40 +0900)]
Add the default deny rule for org.projectx.bt.mesh

There were some policy check errors, this patchset
resolves the issues.

/busconfig/policy[1]/allow[2] : For each allow own you must add a deny own in default context.
/busconfig/policy[1]/allow[4] : For each allow send_destination you must add a deny send_destination in default context.
/busconfig/policy[1]/allow[4] : For each allow send_destination you must add a deny own or deny own_prefix in default context.

Change-Id: Ib191d912b9f64354d77ceb57d5eeab295f53cda2
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: Handle 'Browse'& 'Vendor Feat' cmd Timeout 98/239898/1
Anupam Roy [Thu, 30 Jul 2020 10:34:29 +0000 (16:04 +0530)]
Mesh: Handle 'Browse'& 'Vendor Feat' cmd Timeout

This patch handles Timeout of remote commands
(Mesh node browse & Mesh node vendor feature) and
sends Error to application.

Change-Id: I6013cbfa99dbed60d904bc7f7e422646160f645b
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoFix the dbus permission problem in mesh 18/239818/2
DoHyun Pyun [Thu, 30 Jul 2020 05:08:30 +0000 (14:08 +0900)]
Fix the dbus permission problem in mesh

Change-Id: I285396eb9d57ec3aa88833e1e54d9d0caa6951f6
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMesh: Fix & Refactor Mesh Model Subscription codes 26/239826/2
Anupam Roy [Thu, 30 Jul 2020 05:23:37 +0000 (10:53 +0530)]
Mesh: Fix & Refactor Mesh Model Subscription codes

This patch handles following
- Handle Timeout of Model Subscription Commands
 [bt-service should send error event and clear pending
 request in queue]
- Fix improper handling of Model Subscription status handling
- Add DEBUG prints

Change-Id: I811bc570df8091ce948595c05ebc9856ffd51be2
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Refactor Network group Removal logic 09/239709/2
Anupam Roy [Wed, 29 Jul 2020 06:19:37 +0000 (11:49 +0530)]
Mesh: Refactor Network group Removal logic

Network Groups (Mesh group & virtual Mesh group)
are created and saved in Network Configuration DB.
Therefore, removal of groups by user should remove these
groups from Conf DB also, instead of just removing handles
from application.

Apart from above, this patch refactors 'Get All Mesh groups'
logic. Instead of just fetching the group address, now it fetches
all informations of groups (Label UUID, if Virtual group)

Change-Id: I8ca483ddf46140c3e671070f41a6484b5a04935e
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMerge "Mesh: Apply stabilization fixes in FRWK" into tizen accepted/tizen/unified/20200729.165707 submit/tizen/20200727.225618
Pyun DoHyun [Mon, 27 Jul 2020 22:43:04 +0000 (22:43 +0000)]
Merge "Mesh: Apply stabilization fixes in FRWK" into tizen

3 years agoMesh: Apply stabilization fixes in FRWK 08/239508/2
Anupam Roy [Mon, 27 Jul 2020 07:50:06 +0000 (13:20 +0530)]
Mesh: Apply stabilization fixes in FRWK

This patch applies few fixes for bugs/issues
found during MESH API testing & stabilziation

Some of the notable changes applied are following-
1. Add missing event handling for Model AppKey Configure command
2. Add exception handling for Key Configuration command
  [Send failure event to app, in case of failure]
3. Fix bug in Saving AppKey in Mesh node structure
  [Instead of AppKey, netkey was used, resulting in error]
4. Bug in fetching ALL AppKey(s) bound to a node
  [Instead of retruning appkeys bound to a Netkey, FRWK
   was returning all appkeys bound to a node, resulting in
   unexpected behavior of the API]
5. Added few DEBUG Prints.

Change-Id: I3b704b2eccd9ea79f59bae5deddf4b50275b365f
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoFix the svace issues 23/239223/1 submit/tizen/20200724.011403
DoHyun Pyun [Thu, 23 Jul 2020 00:53:17 +0000 (09:53 +0900)]
Fix the svace issues

Change-Id: Ic678d8d880e0473d738f83dd6d4b21f379a9bd9c
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMerge "Mesh: SVACE defect fixes" into tizen
Pyun DoHyun [Wed, 22 Jul 2020 23:56:49 +0000 (23:56 +0000)]
Merge "Mesh: SVACE defect fixes" into tizen

3 years agoMesh: SVACE defect fixes 54/239054/2
anuj.bhumiya [Tue, 21 Jul 2020 10:45:05 +0000 (16:15 +0530)]
Mesh: SVACE defect fixes

Change-Id: I1afb0f6433dd5d976e5e859d2235e63c0346344d
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
3 years agoMerge "Mesh: Add functionality to find unique app credentials" into tizen
Pyun DoHyun [Wed, 22 Jul 2020 06:18:55 +0000 (06:18 +0000)]
Merge "Mesh: Add functionality to find unique app credentials" into tizen

3 years agoHandle bluetooth-meshd life cycle 68/238968/2
DoHyun Pyun [Tue, 21 Jul 2020 01:18:12 +0000 (10:18 +0900)]
Handle bluetooth-meshd life cycle

Change-Id: I09abb6a7d647bc1462bb60eb273e7e1a0b58c254
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMerge "Mesh: Create mesh directory for configuration files" into tizen
Pyun DoHyun [Mon, 20 Jul 2020 22:34:06 +0000 (22:34 +0000)]
Merge "Mesh: Create mesh directory for configuration files" into tizen

3 years agoMesh: Add functionality to find unique app credentials 32/238932/1
Abhay Agarwal [Mon, 20 Jul 2020 08:33:05 +0000 (14:03 +0530)]
Mesh: Add functionality to find unique app credentials

Unique app credentials would be used to differentiate
and authenticate mesh applications

Change-Id: If8b19d802465282e78ebc3d60f845bed95a68660
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoMesh: Create mesh directory for configuration files 84/238884/1
Abhay Agarwal [Tue, 14 Jul 2020 04:32:56 +0000 (10:02 +0530)]
Mesh: Create mesh directory for configuration files

This patch creates a default dir which can be used to save
mesh configurations for applications

Change-Id: I40c3aec28a97eced3bb9244fc95721c2ac8dc848
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
3 years agoFix the malfunction for gatt 74/238874/1
injun.yang [Thu, 16 Jul 2020 09:01:28 +0000 (18:01 +0900)]
Fix the malfunction for gatt

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] address comparison is wrong
[Cause & Measure] Fix the bug
[Checking Method]

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: Ie54cea33efe3dbdaeb14c144a734a24a88936ba9
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoMesh: Apply Fixes & code refactoring
Anupam Roy [Fri, 17 Jul 2020 18:45:30 +0000 (00:15 +0530)]
Mesh: Apply Fixes & code refactoring

This patch handles following.
1. Few Fixes(some of them are mentioned below)
2. Enable DEBUG logs across all layers
3. Minor code refactoring & indentations
3. Review comments from 'ble_mesh' dev branch
   3.1. Dont Free user data from request info
     [Patch: 237446]
   3.2. Fix typo's for following commits
     [Patch: 237447, 237445, 237440, 237435]

Some of the notable fixes applied are following:-
1. Fix bt-service crash during cleanup of mesh framework resources
   [Resolution: removing double free of Mesh model resources]
2. Fix crash in unit test app during Scan stop operation
   [Resolution: Dont allow Stop scan if scanning is not in progress]
3. Fix Node Browse event fail issue
   [Resolution: Handle wrong usage of event pointer]
4. Fix "Timer expired even if response is received within timeout" issue.
   [Resolution: Remove timer once event is received from stack]
5. Fix "TTL configured callback(CAPI callback)" is not invoked in case of success
   Resolution: Handle wrong usage of event pointer in service layer]
6. Fix NetKey configuration API failed due to mishandling of Key in Network
   [Resolution: Network Key handling is corrected]

Change-Id: I47d3b93c19650dea039ecdf0b8862be32d8d3a96
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Enable Build & Export Mesh Framework API
Anupam Roy [Fri, 17 Jul 2020 18:23:47 +0000 (23:53 +0530)]
Mesh: Enable Build & Export Mesh Framework API

Note: This patch also adds Mesh Network load API

Change-Id: Ice94d7932bcb286f87628fea9099639136d43db8
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Create & attach ELL main loop
Anupam Roy [Fri, 17 Jul 2020 18:13:57 +0000 (23:43 +0530)]
Mesh: Create & attach ELL main loop

This patch primarily attaches bt-service
with ELL mainloop and also initializes OAL

Change-Id: I2cb5d5afe77051160e530ffb74d44de409d35e18
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add framework event handlers
Anupam Roy [Fri, 17 Jul 2020 17:54:37 +0000 (23:24 +0530)]
Mesh: Add framework event handlers

This patch handles following
- Catches events sent by bt-service
- Handles DBUS exception cases for Async requests

Change-Id: I2e74d2f177e76f12822da9aba30f96766268cc86
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add IPC Events & signals entries
Anupam Roy [Fri, 17 Jul 2020 16:47:32 +0000 (22:17 +0530)]
Mesh: Add IPC Events & signals entries

Change-Id: I1d69e3ecda3e9c0164334f8037e8bcd2734913d8
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Handle OAL events
Anupam Roy [Fri, 17 Jul 2020 16:39:33 +0000 (22:09 +0530)]
Mesh: Handle OAL events

Change-Id: I28a26fdd986bc039d19eb657d555063235601cea
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Implement Node configuration API's
Anupam Roy [Fri, 17 Jul 2020 16:27:51 +0000 (21:57 +0530)]
Mesh: Implement Node configuration API's

This patch-set handles following
- Configure Keys
- Configure Publications (GET/SET)
- Configure Subscription (Get/Set)
- Model Binding
- Configure TTL (Time to Live)
- Browse Node's composition
- Browse Node's vendor features
- Configure Groups(Normal & Virtual)

 Note: application credential is requested
 in service layer to get access to Mesh Resources
 for formward coompatibility.
 Credentials are not yet fully handled.

Change-Id: I6e3dd9a17167b528725f7a472d248d7f883c61be
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Implement Configuration Client
Anupam Roy [Fri, 17 Jul 2020 14:10:42 +0000 (19:40 +0530)]
Mesh: Implement Configuration Client

This patchset primarily handles following
- Add Mesh Configuration Client
- Adds Node Operations
 a/ Save & retrieve Node composition & features
 b/ Save/Remove Keys added to node(s)
 c/ Save/Remove node(s) entry in CDB
- Mesh Group management

Change-Id: Ic2b455e122ea89086fb1db5373f0efe856806137
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Implement Network Key operations
Anupam Roy [Fri, 17 Jul 2020 11:15:45 +0000 (16:45 +0530)]
Mesh: Implement Network Key operations

Ths patch major handles following
- Create/Update/Delete Network Key
- Create/Update/Delete Application Key
- Set Network Friendly Name

Change-Id: I3f9a3588f11ee735352788fb86c6ec81882fc626
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Implement Mesh Framework API's
Anupam Roy [Fri, 17 Jul 2020 11:08:01 +0000 (16:38 +0530)]
Mesh: Implement Mesh Framework API's

This patch-set is the initial implementation
of basic Mesh network operations
- Create Network
- Scan for Unprovisioned devices
- Scan Cancel
- Set Network Provisioning capabilities
- Provision a device into the network

Change-Id: Ie23af0276055e666a06b9fcbf9dbd7e74c147e8b
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add loading of Nodes & Keys from CDB
Anupam Roy [Fri, 17 Jul 2020 10:50:37 +0000 (16:20 +0530)]
Mesh: Add loading of Nodes & Keys from CDB

This patch adds following
- Load CDB from peviously configured network
- Load Nodes from CDB
- Load Keys from CDB
- Group management in CDB
- Network friendly name Get/Set
- Few helper functions

Change-Id: Ic6dcc266bea3994b0ba5cb3e9b808cc196414341
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Handle Key management operations
Anupam Roy [Fri, 17 Jul 2020 10:44:01 +0000 (16:14 +0530)]
Mesh: Handle Key management operations

This patch handles following
- Delete NetKey
- Unload of network
- NetKey Phase Set

Change-Id: I6a95631a369c8ef02f8a5dae7d5e93905efd0f36
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add Stack event handlers
Anupam Roy [Fri, 17 Jul 2020 10:41:05 +0000 (16:11 +0530)]
Mesh: Add Stack event handlers

This patch adds following
- Handles Mesh OAL events
- Completes DBUS invocation contexts
- Sends Mesh events to application

TODO:
- Handle Network Key(Subnet & Application) events
- Handle DevKey cofigruation events

Change-Id: I2a505b7858bc65124bc94bd01bdabfe9daf18f5e
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add Local Network Configuration
Anupam Roy [Fri, 17 Jul 2020 10:35:51 +0000 (16:05 +0530)]
Mesh: Add Local Network Configuration

This patch handles Network operations
& requests to Mesh OAL layer
- Network Create
- Scan for unprovisioned devices
- Provision devices to Mesh Network
- Set Provisioner capabilities
- Authentication Reply

TODO: Following will be added in subsequent patches
- Secuity Key management API's
- Node management API's

Change-Id: I2409e216abfcdadfb44d73a6c365941e22c699ca
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add support for Configuration DB & Node API
Anupam Roy [Fri, 17 Jul 2020 10:30:54 +0000 (16:00 +0530)]
Mesh: Add support for Configuration DB & Node API

This patch handles following
- JSON DB for remembering configured network
- Structures & API for accessing provisioned nodes

Change-Id: I2abf92481863c18e8f3c970074f26151587c2c08
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Management of Keys in a local Network
Anupam Roy [Fri, 17 Jul 2020 10:14:19 +0000 (15:44 +0530)]
Mesh: Management of Keys in a local Network

This patch adds Local Key Management methods.
Some of the key methods are following.
- Create & manage Netkeys & appkeys
- Get NetKey list in a Network
- Get AppKey list bound to a NetKey in a network
- Get new Netkey and Appkey indecesMesh: Management of Keys in a local Network

This patch adds Local Key Management methods.
Some of the key methods are following.
- Create & manage Netkeys & appkeys
- Get NetKey list in a Network
- Get AppKey list bound to a NetKey in a network
- Get new Netkey and Appkey indeces

Change-Id: Ib752432f4908f33c260177956a2b15b15fccf316
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add Utility & helper functions for service
Anupam Roy [Fri, 17 Jul 2020 10:07:23 +0000 (15:37 +0530)]
Mesh: Add Utility & helper functions for service

This patch adds basic set of Mesh utility
& helper methods. It will be expanded to
support more methods in future

Change-Id: Ib36f7da93719acd67456262d100d9a1f7de75fca
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add enums & signals IPC requests & events
Anupam Roy [Fri, 17 Jul 2020 09:24:30 +0000 (14:54 +0530)]
Mesh: Add enums & signals IPC requests & events

Change-Id: I29ae9ed1e4d2ef296446e3cc7279db19db8e2dbe
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add HAL implementation
Anupam Roy [Thu, 25 Jun 2020 15:00:54 +0000 (20:30 +0530)]
Mesh: Add HAL implementation

This patch adds following
- Implements the HAL interface for
  Mesh Network & Node configurations.
- Implements HAL DBUS handler interfaces
  for communicating with Mesh daemon

Change-Id: I4bcf3e3e7d18911ed676c09ffa6d3fae421937da
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add dependency on ELL & JSON-C
Anupam Roy [Fri, 17 Jul 2020 09:14:06 +0000 (14:44 +0530)]
Mesh: Add dependency on ELL & JSON-C

Change-Id: Ib0752d10472513972484a27df2620af34a839eac
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Implement OAL API's
Anupam Roy [Thu, 25 Jun 2020 10:38:40 +0000 (16:08 +0530)]
Mesh: Implement OAL API's

This patch handles following:
- Adds Mesh OAL events
- Adds Implementation of Mesh API's

Change-Id: I74f7cbf29e06042fd23a27b37b9fb0415269e92a
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add Mesh Stack DBUS handler API's
Anupam Roy [Thu, 25 Jun 2020 08:56:06 +0000 (14:26 +0530)]
Mesh: Add Mesh Stack DBUS handler API's

Change-Id: I8f331d68a1a5830f6fc05fb75007621cb1a83ed7
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add HAL interface
Anupam Roy [Thu, 25 Jun 2020 05:32:33 +0000 (11:02 +0530)]
Mesh: Add HAL interface

This patch adds following
- Mesh HAL events
- Application callback signatures
- Application API signatures

Mesh Application shall comply with above
Mesh HAL interface

Change-Id: I09c2ddf29173feff6f183913700513891791aa02
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add OAL Mesh API
Anupam Roy [Thu, 25 Jun 2020 04:11:59 +0000 (09:41 +0530)]
Mesh: Add OAL Mesh API

This patch adds basic Mesh OAL API's.

Note:
- The current set of OAL API's can fully cover
  all Tizen Native API's developed so far.

- Following API is added for forward compatibility.
 'oal_status_t mesh_model_send_message()'
  Above API will transport Mesh Application specific messages
  which are generated by Application specific Models.
  It is upto Application to support any Models (BT SIG or Vendor)

Change-Id: I5984a5949a9fe0f3fa527d00b8d0feff0a01055b
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoMesh: Add Bluetooth Framework API
Anupam Roy [Wed, 24 Jun 2020 19:02:45 +0000 (00:32 +0530)]
Mesh: Add Bluetooth Framework API

This patch defines all Mesh events &
structures for sharing data between
Mesh framework and Mesh service

Change-Id: I9a29c90c7dcfc3d7187ab08f2c5c5b8f5cca96a9
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
3 years agoGATT: Remove unhandled request info 52/238652/1
injun.yang [Tue, 14 Jul 2020 12:08:51 +0000 (21:08 +0900)]
GATT: Remove unhandled request info

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] Server app send response, but it is handled as invalid request info
[Cause & Measure] request info is not removed on previous link. Remove request info.
[Checking Method] n/a

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: Id6cc4293f6ab9a89948ecda35ed481793a9f7d5a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoInit hal gatt resources when bt is enabled 44/238644/1
Deokhyun Kim [Wed, 15 Jul 2020 08:15:48 +0000 (17:15 +0900)]
Init hal gatt resources when bt is enabled

Change-Id: I4c97c403c69973c3e083675336b919d54ad37c8b
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix the issue that can not send device event 23/238523/1 submit/tizen/20200715.062123
DoHyun Pyun [Wed, 15 Jul 2020 00:03:55 +0000 (09:03 +0900)]
Fix the issue that can not send device event

If we don't call bt_enable_adapter explictly, the device event
callback is not registered such as the recovery situation.
To fix this issue, calls the register function in adapter
enabled callback.

Change-Id: Id110c1fa249e1f9d4f6b1fc8b90e82266a53c686
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix uuid duplication issue for registering server instance 54/238354/3 submit/tizen/20200713.053616
Wootak Jung [Mon, 13 Jul 2020 04:41:14 +0000 (13:41 +0900)]
Fix uuid duplication issue for registering server instance

Same uuids are in used if two registration requests are coming simultaneously.

Change-Id: I8700fd944d5e866b334fd3b3f16020afabbf1a22
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoAdd server info finding logic for getting mtu 37/238037/1 accepted/tizen/unified/20200710.114128 submit/tizen/20200708.225225
Wootak Jung [Wed, 8 Jul 2020 00:57:53 +0000 (09:57 +0900)]
Add server info finding logic for getting mtu

Change-Id: I152679386cde402b881c47f0a5c7f264bf20a632
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix gatt info index mismatch issue 44/237944/1
Wootak Jung [Tue, 7 Jul 2020 00:55:50 +0000 (09:55 +0900)]
Fix gatt info index mismatch issue

numapps index is not instance id

Change-Id: I771e4c63596ef385973bc3864c94d75a59693d2b
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoSend a gatt event to sender 17/237717/1
injun.yang [Thu, 11 Jun 2020 00:42:36 +0000 (09:42 +0900)]
Send a gatt event to sender

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] All gatt client app receive a gatt read/write completed event.
[Cause & Measure]  Send dbus signal to all. Just send it to sender only
[Checking Method] gatt read / write request

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I66a40b9d5fa087532faacf0ec73032ecf0fa131f
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoRemove old bt-service files 11/237611/2
DoHyun Pyun [Thu, 2 Jul 2020 01:18:02 +0000 (10:18 +0900)]
Remove old bt-service files

Change-Id: I4871d7b3528755ad35021060a0b333ccc4ace8cd
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoAdd the sender name in signal subscribe function 04/237604/1
DoHyun Pyun [Wed, 1 Jul 2020 23:13:06 +0000 (08:13 +0900)]
Add the sender name in signal subscribe function

To avoid the redundent call we can add the sender
name in dbus signal subscribe function.

Change-Id: Ide9f9063718ca567e9793fb0cacf4b957bb9fb2e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix dbus signal subscribe bug 21/237521/1
INSUN PYO [Wed, 1 Jul 2020 05:23:55 +0000 (14:23 +0900)]
Fix dbus signal subscribe bug

Change-Id: I59c51512faaa37f228281300c8267f37b29d0c2d

3 years agoHandle the recovery only for wearable profile 71/237371/1 accepted/tizen/unified/20200701.123251 submit/tizen/20200630.223543
DoHyun Pyun [Mon, 29 Jun 2020 23:33:19 +0000 (08:33 +0900)]
Handle the recovery only for wearable profile

Change-Id: Id421632f3ac756d88bc8cf36649840a1d21d0009
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix bt-service crash on Fhub TCT 70/237370/1
DoHyun Pyun [Mon, 29 Jun 2020 23:32:01 +0000 (08:32 +0900)]
Fix bt-service crash on Fhub TCT

Change-Id: I789bc00ec7fd410b81527459a4d101376d1af9a3
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoHandle the obex agent using tizen OPP feature 74/237074/1
DoHyun Pyun [Thu, 25 Jun 2020 00:45:29 +0000 (09:45 +0900)]
Handle the obex agent using tizen OPP feature

Change-Id: Ifcb5a53d0e69a8f673d3fca0a63ffcdd374e572b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoSet the default visible mode to off for IOT Speaker 38/236638/2
DoHyun Pyun [Fri, 19 Jun 2020 01:37:30 +0000 (10:37 +0900)]
Set the default visible mode to off for IOT Speaker

Change-Id: I006beae3059e8117c525bea4cd0e1dde4b8ffa41
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoMerge "Fix the svace issue - DEREF_AFTER_NULL" into tizen accepted/tizen/unified/20200622.134520 submit/tizen/20200619.022955
Pyun DoHyun [Fri, 19 Jun 2020 02:17:49 +0000 (02:17 +0000)]
Merge "Fix the svace issue - DEREF_AFTER_NULL" into tizen

3 years agoFix the svace issue - DEREF_AFTER_NULL 17/236617/1
DoHyun Pyun [Fri, 19 Jun 2020 00:52:50 +0000 (09:52 +0900)]
Fix the svace issue - DEREF_AFTER_NULL

Change-Id: Iccfd32bcffe702cfe06cf09a253aded99e36738d
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
3 years agoFix the memory leak 98/236098/1 accepted/tizen/unified/20200616.171014 submit/tizen/20200615.054717
injun.yang [Fri, 12 Jun 2020 05:12:12 +0000 (14:12 +0900)]
Fix the memory leak

Change-Id: I34936645a2f3fa8a3cf3d40207cf5f8c54309394
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoApply send_type="method_call" to dbus default deny 97/236097/1
Deokhyun Kim [Fri, 29 May 2020 05:35:14 +0000 (14:35 +0900)]
Apply send_type="method_call" to dbus default deny

Change-Id: I147fd51dff0691b8ed4629d86a3dcb5410e5589d
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoUse g_strdup to avoid double free 96/236096/1
Deokhyun Kim [Thu, 11 Jun 2020 09:18:59 +0000 (18:18 +0900)]
Use g_strdup to avoid double free

Change-Id: If591f112b1deb63a6c7433e6eda646ccef3696a9
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix: Handle the duplicated gatt descriptor 44/235944/1 submit/tizen/20200611.012128 submit/tizen/20200612.041013
injun.yang [Wed, 10 Jun 2020 00:22:45 +0000 (09:22 +0900)]
Fix: Handle the duplicated gatt descriptor

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] Duplicated gatt event occured for a same uuid.
[Cause & Measure] descriptor duplicated on list. Check the path before adding it.
[Checking Method] Service browsing

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I897a7a6d4cebd06162159222ed3606b3fa4f5c64
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoRemove __INTEGRATE_GATT_INFO__ feature 99/235899/3
Wootak Jung [Thu, 11 Jun 2020 01:09:28 +0000 (10:09 +0900)]
Remove __INTEGRATE_GATT_INFO__ feature

Easy Setup scenario not supported

Change-Id: Ie9e19de45f5b551de32561d74c865b44c5ceeab0
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix bt-service crash issue on testhub 94/235894/1
Wootak Jung [Thu, 11 Jun 2020 00:24:11 +0000 (09:24 +0900)]
Fix bt-service crash issue on testhub

user_data will be freed in _bt_free_info_from_invocation_list

Change-Id: I43b84fd007ae7786d6b14140109a969736a04059
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoMerge "Implement get_att_mtu logic in hal gatt client" into tizen accepted/tizen/unified/20200610.015607 submit/tizen/20200609.024649
Pyun DoHyun [Tue, 9 Jun 2020 02:34:22 +0000 (02:34 +0000)]
Merge "Implement get_att_mtu logic in hal gatt client" into tizen

3 years agoImplement get_att_mtu logic in hal gatt client 92/235592/1
Wootak Jung [Mon, 8 Jun 2020 02:44:32 +0000 (11:44 +0900)]
Implement get_att_mtu logic in hal gatt client

Change-Id: I8013154244497fe471fc6ce6ba63b2495c7b16d4
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoDisallow HFP multi connection 88/235388/1
Sangki Park [Thu, 21 May 2020 07:11:29 +0000 (16:11 +0900)]
Disallow HFP multi connection

Change-Id: I56e07cd917601a4ea486026389fd1f99827edf84
Signed-off-by: Sangki Park <sangki79.park@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoApply memory limit to 30M and recovery logic 73/235373/1
Deokhyun Kim [Tue, 2 Jun 2020 06:33:47 +0000 (15:33 +0900)]
Apply memory limit to 30M and recovery logic

 - Restart bt-service by SIGKILL even if mem usage exceeds 30M
 - Recover bt even if bt has been activated without bt-service

Change-Id: Ib325fd770c85f8545324674b0b77dd07be0a8604
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix mem leak 71/235371/1
Deokhyun Kim [Tue, 2 Jun 2020 10:47:15 +0000 (19:47 +0900)]
Fix mem leak

Change-Id: I3da1dfa1b14811b00d82afaa5880173fd03edd49
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix human error 66/235366/1
injun.yang [Fri, 29 May 2020 04:38:05 +0000 (13:38 +0900)]
Fix human error

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem]
[Cause & Measure]
[Checking Method]

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I0d27b3fd2a583e807c5c2076f42290271a04b3ac
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix the memory leak 64/235364/1
injun.yang [Fri, 29 May 2020 04:19:23 +0000 (13:19 +0900)]
Fix the memory leak

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] P200528-00621
[Request] Internal
[Occurrence Version] N/A

[Problem] memory leak
[Cause & Measure] leak
[Checking Method] basic test

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I04a8bb10165a908042e66d86fc2307ac614f0cc7
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoApply headset connection logic. 63/235363/1
Deokhyun Kim [Thu, 28 May 2020 09:30:53 +0000 (18:30 +0900)]
Apply headset connection logic.

[Model] Noblesse
[BinType] AP
[Customer] OPEN

[Issue#] P200528-02767
[Request] PLM
[Occurrence Version] ATE6

[Problem] A2DP is not connected when connecting to carkit. HF is connected only.
[Cause & Measure] Carkit does not connect A2DP
[Checking Method] Apply headset connection logic. If carkit does not connect
  A2DP for 3 seconds after HFP is connected, then try to connect A2DP.

[Team] Bluetooth
[Developer] Deokhyun Kim
[Solution company] Samsung
[Change Type] Specification change

Change-Id: Id37522dece69a5efa0b60f9c1a9d7e764f05456d
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoRemove bt-core dbus retry count, and change timeout from 2S to 10S 49/235349/1
Deokhyun Kim [Wed, 27 May 2020 10:14:05 +0000 (19:14 +0900)]
Remove bt-core dbus retry count, and change timeout from 2S to 10S

Change-Id: Id99aa3904a6a26d5acd88b8e021070cc9128e169
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoSimplify the logic to manage invocation list 48/235348/1
Deokhyun Kim [Tue, 26 May 2020 09:23:47 +0000 (18:23 +0900)]
Simplify the logic to manage invocation list

Change-Id: Ic7df672381bd027f977e4e0f0306d59381f58654
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix glib error 43/235343/1
injun.yang [Tue, 2 Jun 2020 06:29:32 +0000 (15:29 +0900)]
Fix glib error

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] gvairant type is wrong
[Cause & Measure] change the type
[Checking Method]

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: I10960fa5e65b812318282e67f1f4ddf8ba488183
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix the memory leak 42/235342/1
injun.yang [Tue, 2 Jun 2020 04:56:47 +0000 (13:56 +0900)]
Fix the memory leak

[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] Internal
[Occurrence Version] N/A

[Problem] memory leak on gatt connection
[Cause & Measure] release memory
[Checking Method]

[Team] Convergence BT
[Developer] Injun Yang
[Solution company] Samsung
[Change Type] Specification change

Change-Id: Id1268133170c202d2342f076d8302140c2e5ef0e
Signed-off-by: injun.yang <injun.yang@samsung.com>
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
3 years agoFix the svace issue - MEMORY LEAK 20/235320/1 accepted/tizen/unified/20200605.020512 submit/tizen/20200604.003952
DoHyun Pyun [Wed, 3 Jun 2020 23:53:15 +0000 (08:53 +0900)]
Fix the svace issue - MEMORY LEAK

Change-Id: Id407c2e5d9c6925f24198da9359ec3fdd54be8bc
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>