aboutsummaryrefslogtreecommitdiffstats
path: root/binding/bluetooth-conf.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-07Fixing pincode problemmarlin_12.90.0marlin/12.90.0lamprey_11.92.0lamprey_11.91.0lamprey/11.92.0lamprey/11.91.012.90.011.92.011.91.0Saman Mahmoodi1-2/+2
In get_pincode function there was a problem as below: when the set_pincode verb is not called so in the DB we have not any pincode then for pairing it should use default pincode as 1234 in the get_pincode function when is called read verb from persistence, if pincode does not exist the pincode variable is NULL so we should check the pincode variable and if is NULL, we should assign default value as 1234 Bug-AGL: SPEC-3814 Signed-off-by: Saman Mahmoodi <mahmoudi.saman1@gmail.com> Change-Id: I5f72834d2dcd8ecd3861fc894f4b1a7ebd7efc04
2020-10-06Adding pairing request with authentication as "RequestPinCode"saman1-0/+46
Adding outgoing pairing request with another BT device when we call pair verb. "RequestPinCode" is handled as xml into bluetooth-agent.c to confirm a pincode and send it to BT device when we call pair request from AGL device to other device. Bug-AGL: SPEC-3610 Signed-off-by: saman <mahmoudi.saman1@gmail.com> Change-Id: I4fa8c9ab5d3bbf323cee7645f217bb1056d93b65
2020-09-21create persistence binding entry for default adapterRaquel Medina1-0/+7
Add logic to create an entry for 'default_adapter' in the persistence database. This will enable having the stored value available between power up/power down cycles. Bug-AGL: SPEC-3577 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I158dcc1d37ccaf8dfe5d53e262f0619ad780c26a
2020-07-13fix segfaults due to races & missing adapterRaquel Medina1-5/+6
During start up, there are races between the bluetooth, persistence, bluetooth-map and bluetooth-pbap bindings; on top of it, in the case there's no bluetooth controller in the system, various key parameters can exhibit a null value. The combination of these races and the lack of bluetooth controller can manifest in a number of segfaults in the bluetooth binding (it's very easy to reproduce on qemu). This commit brings in several changes to make the bluetooth binding resilient to the races and lack of bluetooth controller: * on startup, retrieve the default adapter from the persistence binding from the init thread * store the system default adapter in the service init data structure, and store the active adapter in the bluetooth state structure. * update get_default_adapter to return value obtained from persistence biding, without further processing; * add guards to make sure the userdata retrieved from the application framework is valid; * on verbs processing, ensure the caller provides an adapter to apply the verb to, or that at least there's a valid adapter associated to the bluetooth state structure; * initialize agent_data's device_path following free operation; * add guards for mediaplayer_path. Bug-AGL: SPEC-3301 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ia5a0dc9a61024ff43cd247216d0dff6918046f7e
2018-12-07binding: bluetooth: add default_adapter verbMatt Ranostay1-0/+71
Allow setting of default adapter for use by other verbs within the binding. This allows to select an adapter on boards with more than one. Bug-AGL: SPEC-1630 Change-Id: Iec77b0abaa9f4c092dc5c827522efb1744953fce Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>