• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2#
3# Copyright (C) 2018 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License"); you may not
6# use this file except in compliance with the License. You may obtain a copy of
7# the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14# License for the specific language governing permissions and limitations under
15# the License.
16
17AUDIO_ROUTE_SPEAKER = "SPEAKER"
18AUDIO_ROUTE_BLUETOOTH = "BLUETOOTH"
19
20CALL_WAIT_TIME = 10
21DISCOVERY_TIME = 13
22WAIT_TIME = 3
23PROP_UPDATE_TIME = 5
24
25OBJECT_MANGER = "org.freedesktop.DBus.ObjectManager"
26PROPERTIES = "org.freedesktop.DBus.Properties"
27PROPERTIES_CHANGED = "PropertiesChanged"
28SERVICE_NAME = "org.bluez"
29CALL_MANAGER = "org.ofono.VoiceCallManager"
30VOICE_CALL = "org.ofono.VoiceCall"
31OFONO_MANAGER = "org.ofono.Manager"
32
33ADAPTER_INTERFACE = SERVICE_NAME + ".Adapter1"
34DBUS_INTERFACE = "org.freedesktop.DBus.Properties"
35DEVICE_INTERFACE = SERVICE_NAME + ".Device1"
36MEDIA_CONTROL_INTERFACE = SERVICE_NAME + ".MediaControl1"
37MEDIA_PLAY_INTERFACE = SERVICE_NAME + ".MediaPlayer1"
38
39A2DP_TEST = "a2dp"
40HFP_TEST = "hfp"
41MULTIPROFILE_TEST = "multiprofile"
42HCI_CONFIG_UP = "up"
43HCI_CONFIG_DOWN = "down"
44BLUEZ_PATH = "/usr/local/bluez/"
45KILL_CMD = "kill -9 "
46FIND_PROCESS = "ps -elf|grep "
47CMD_FIND = ""
48CMD_PATH = ""
49CMD_HCI = "hciconfig hci0 "
50
51commands = {
52    "dbus": "dbus-1.8.6/bin/dbus-daemon --system --nopidfile",
53    "bluez": "bluez-5.39/libexec/bluetooth/bluetoothd -ndE --compat",
54    "ofono": "ofono-1.17/sbin/ofonod -nd",
55    "pulseaudio": "pulseaudio-8.0/bin/pulseaudio  -vvv",
56}
57
58bluetooth_profiles = {
59    "A2DP_SRC": "0000110a-0000-1000-8000-00805f9b34fb",
60    "HFP_AG": "0000111f-0000-1000-8000-00805f9b34fb"
61}
62