This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
bluetooth_phone [2015/08/08 22:57] wminer Delete all move to agl-demonstrator namespace |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Bluetooth Phone ====== | ||
- | |||
- | ===== Summary ===== | ||
- | |||
- | |||
- | This application BlueZ/Ofono provides voice call from paired Bluetooth phone. | ||
- | |||
- | The application uses following APIs: | ||
- | * Phone library: This class provides methods to operate with contacts and call history | ||
- | * tizen.bt as replacement of tizen.bluetooth %%API%% due to conflicts in underlying framework. The following Bluetooth functionalities are provided via Tizen Bluetooth %%API%%: | ||
- | * Controls local Bluetooth device, that is, turn Bluetooth on/off, etc. | ||
- | * Sets visibility | ||
- | * Discovers nearby Bluetooth devices (Device discovery). | ||
- | * Gets bonded devices information. | ||
- | * Controls bonding. | ||
- | * Connects to a service on a remote device and exchanges data. | ||
- | * Registers a service (RFCOMM) on a local device, which can be consumed by remote devices to exchange data. | ||
- | |||
- | The application supports multiple connected devices, however only one of the devices can be selected at the time. Selection is done from Bluetooth UI. In case that phone has active call additional Carousel element is replaced by CallDuration element. | ||
- | |||
- | The application allows following operations: | ||
- | * Place call | ||
- | * Handles incoming calls passed from IncomingCall widget | ||
- | * Display call history | ||
- | * Display contact list | ||
- | * Mute/unmute call - not working due to TIVI-2448 | ||
- | |||
- | Additionally application can be controlled using speech recognition via Speech component. | ||
- | |||
- | |||
- | ===== Resources ===== | ||
- | |||
- | |||
- | Watch [[https://download.automotivelinux.org/POC/PoC_Videos/BT%20Phone%20PoC%20V2.mp4|Bluetooth Phone video]]. | ||
- | |||
- | Access the [[https://download.automotivelinux.org/POC/PoC_DRDs/DRD_BlueZ-Ofono_BT_Phone_v2.xlsx|Requirements Document (DRD)]]. | ||
- | |||
- | Access the [[https://gerrit.automotivelinux.org/gerrit/gitweb?p=POC-HTML5-UI/Phone.git;a=summary|App Sources]] and [[https://gerrit.automotivelinux.org/gerrit/gitweb?p=POC-NATIVE/phoned.git;a=summary|Native Code Sources]]. | ||
- | |||
- | Download the [[https://download.automotivelinux.org/POC/PoC_WGT/Phone_AGL_03SEP2014.wgt|Application WGT]]. | ||
- | |||
- | |||
- | ===== What the app does ===== | ||
- | |||
- | |||
- | Features for Bluetooth include the following: | ||
- | * Viewing available devices in range | ||
- | * Pairing with a device | ||
- | * Displaying the status of various devices | ||
- | * Selecting the device once permissions have been exchanged | ||
- | * Downloading information such as contacts from the device | ||
- | * Allowing interactivity between devices interchangeably | ||
- | |||
- | Features for Phone include the following: | ||
- | * Making and receiving calls either manually or through the contact list | ||
- | * Viewing recent calls made on either of the devices | ||
- | * Viewing contacts | ||
- | |||
- | To launch the Phone application the user touches the phone icon at the top of the device (handset shape), or it can be launched through the Application Screen. If the Bluetooth connection has not yet been established, it will display the text “NO BT DEVICE SELECTED”. | ||
- | |||
- | {{:wiki:wiki:phone1.png?300}} | ||
- | |||
- | The user needs to visit the Bluetooth Settings Screen in order to establish a connection between devices before the features for the Phone application are available. To do this, the user can go to the Settings Screen by touching the settings icon at the top right on the Home Screen or Phone application, or by going through the Applications Screen and touching the settings icon. Once in the Settings Screen, the user touches the word BLUETOOTH and the Bluetooth Settings Screen opens. | ||
- | |||
- | {{:wiki:wiki:phone2.png?300}} {{ :wiki:wiki:phone3.png?300|}} | ||
- | |||
- | If Bluetooth is not yet turned on, the user taps the TURN ON button to scan for nearby devices. A list of devices that can be connected show up, each with a PAIR button next to it. Previously paired devices would also show up on the screen, with the option to UNPAIR. | ||
- | |||
- | {{:wiki:wiki:phone4.png?300|}} {{ :wiki:wiki:phone5.png?300|}} | ||
- | |||
- | The user taps the PAIR button. The mobile device being paired must now be checked, to see if the Bluetooth request for pairing permission has been sent. Respond affirmatively and the Bluetooth Settings screen will show that the selection is occurring. | ||
- | |||
- | {{:wiki:wiki:phone6.png?200|}} {{ :wiki:wiki:phone7.png?200|}} | ||
- | |||
- | When devices have been paired the Bluetooth application should also request permission to access the mobile device’s phonebook. If not, the user must check the mobile device’s settings to make sure the profile for a phone connection is enabled. | ||
- | |||
- | Once the final permission has been given, the application shows confirmation that the mobile device is | ||
- | * Paired, | ||
- | * Selected, | ||
- | * What type of device it is, | ||
- | * Connected, | ||
- | * And an option to UNPAIR will be available. | ||
- | |||
- | {{:wiki:wiki:phone8.png?300|}} {{ :wiki:wiki:phone9.png?300|}} | ||
- | |||
- | The user can go now go back to the Phone application by using the BACK button or tapping the X at the top right corner of the screen to close the Settings Screen from the Phone application. | ||
- | |||
- | Now that the mobile device is paired and enabled within the Bluetooth settings, the phone application is able to place calls, handle incoming calls, display a call history, and display a contact list. The phone application screen will show recent calls under the telephone keypad. Use single finger scroll to go through the carousel list for the phone numbers and possibly see a thumbnail image of the caller | ||
- | |||
- | {{:wiki:wiki:phone10.png?300|}} {{ :wiki:wiki:phone11.png?300|}} | ||
- | |||
- | By tapping the Contacts List icon (the A-Z flag in the upper right) the contact list is viewable. | ||
- | The list can be viewed in either list or icon view by tapping the grid icon or line icon to the left. | ||
- | |||
- | {{:wiki:wiki:phone12.png?300|}} {{ :wiki:wiki:phone13.png?300|}} | ||
- | |||
- | To see the details for a contact, tap the contact row or icon. Then the screen shows the details for that particular contact. Tap the phone number to initiate a call. | ||
- | |||
- | The keypad screen displays the caller with thumbnail, and will display the status DIALING. | ||
- | Once answered, the screen indicates the call duration in addition to showing the options for the features SPEAKER, MUTE, HOLD, and ADD CALL. | ||
- | Tap the red button to terminate the call. | ||
- | |||
- | {{:wiki:wiki:phone14.png?300|}} | ||
- | |||
- | To receive a call via Bluetooth, which is to the mobile device, simply tap the green panel. | ||
- | To dismiss a call, just tap the red panel, or the user can also interact with the connected device. | ||
- | The user may exit the Phone App at any time using the return arrow. If using another application, the Phone App will interrupt with the incoming call screen (see just above) and give the user the option to receive or reject the call. | ||
- | |||
- | |||
- | ===== Technical Details ===== | ||
- | |||
- | |||
- | The sections below are taken from directions for what is known as the Tizen IVI 3.0-M2-EOY (commonly called 'the Jan. 15 image'. The current Tizen release is dated 2014.01.14, and may require some adjustment. | ||
- | |||
- | |||
- | ==== Installation Prerequisites ==== | ||
- | |||
- | |||
- | The following installation directions take the base Tizen image and install needed supporting software | ||
- | |||
- | - The most recent version of the WRT Bluetooth plugin. Cloneable from here: review.tizen.org/profile/ivi/wrt-plugins-ivi-bt. | ||
- | - Version 12.1.3750 of the Phone widget. Run wrt-launcher -l to check your version. | ||
- | |||
- | |||
- | ==== Instructions for debugging WRT Apps on Tizen IVI (installation, removal, and deployment) ==== | ||
- | |||
- | |||
- | Tizen IVI WRT applications are built into widget ('.wgt') files for deployment (a format based on the W3C widget specification, see http://www.w3.org/TR/widgets/ for more information). Once you have built or received the widget files for one or more applications that you wish to deploy and run, the next step is to copy them onto the target device. Common options for this would be tools like scp/sftp (in a Linux/Unix environment), FileZilla (Windows and Mac) or Cyberduck (Mac). | ||
- | |||
- | Once the .wgt files have been transferred to the target machine, they may be installed, launched and uninstalled. | ||
- | |||
- | To get a list of currently installed applications, use the following command from a terminal (or remote shell/ssh session) on the target hardware (log in as root with the password tizen): | ||
- | |||
- | root:~> wrt-launcher -l | ||
- | |||
- | This will produce output similar to the following: | ||
- | |||
- | | **No**| **Name **| **Version**| **GUID** | **Package ID**| **App ID** | | ||
- | | 1| saythis | 1.0.0 | %%http://yourdomain/sayThis%% | lYjFlj49Q4 | lYjFlj49Q4.saythis | | ||
- | | 2| Settings | 1.0.0 | %%http://yourdomain/Settings%% | ODBQpKvkS1 | ODBQpKvkS1.Settings | | ||
- | | 3| MediaPlayer | 1.0.0 | %%http://yourdomain/MediaPlayer%% | t8j6HTRpuz | t8j6HTRpuz.MediaPlayer| | ||
- | | 4| Store |8.2.4401 | %%http://com.intel.tizen/store%% | intelPoc13 | intelPoc13.Store | | ||
- | | 5| Phone | 8.2.4399 | %%http://com.intel.tizen/phone%% | intelPoc15 | intelPoc15.phone | | ||
- | |||
- | |||
- | If the application you wish to install is not already installed, simply enter (using intelPoc16.HVAC.wgt as an example): | ||
- | |||
- | root:~> wrt-installer -i intelPoc16.HVAC.wgt | ||
- | |||
- | If successful, you should see output such as the following: | ||
- | |||
- | =========================================================== | ||
- | # wrt-installer # | ||
- | # argc [3] | ||
- | # argv[0] = [wrt-installer] | ||
- | # argv[1] = [-i] | ||
- | # argv[2] = [intelPoc16.HVAC.wgt] | ||
- | ## wrt-installer : intelPoc15.phone installation was successful. | ||
- | =========================================================== | ||
- | |||
- | If unsuccessful, you may see errors such as 'invalid widget package', 'privilege level violation' or, if the application is already installed (and its widget file was built with a different signature than the one you wish to install), 'invalid signature'. The first two errors are out of scope for this document. | ||
- | |||
- | If you see 'invalid signature', and the widget file has to your knowledge been created with a valid signature, the likely cause is a conflict between the signature of the currently installed version and that of the new version. Though both signatures may be valid, the system treats the upgrade of an existing package with a different signature as a security violation. To work around this issue, simply uninstall the application and subsequently install the new version: | ||
- | |||
- | root:~> wrt-installer -un intelPoc15.phone <-- note: use the App ID when | ||
- | un-installing and the full widget filename when installing | ||
- | |||
- | If the uninstall is successful, you should see output like the following: | ||
- | |||
- | =========================================================== | ||
- | # wrt-installer # | ||
- | # argc [3] | ||
- | # argv[0] = [wrt-installer] | ||
- | # argv[1] = [-un] | ||
- | # argv[2] = [intelPoc15.phone] | ||
- | =========================================================== | ||
- | ## wrt-installer : intelPoc15.phone uninstallation was successful. | ||
- | |||
- | Refer to installation instructions above for the subsequent installation steps. | ||
- | |||
- | In order to launch and run an installed application, issue the following command with the application's App ID as an argument: | ||
- | |||
- | root:~> wrt-launcher -s intelPoc15.phone | ||
- | |||
- | You should see the application start and run on the target device. | ||
- | |||
- | To launch the application in debug mode, add the '-d' flag: | ||
- | |||
- | root:~> wrt-launcher -d -s intelPoc15.phone | ||
- | |||
- | This will produce output like the following: | ||
- | |||
- | root:~/wgt> wrt-launcher -d -s intelPoc15.phone | ||
- | port: 36070 | ||
- | result: launched | ||
- | |||
- | The port number referenced is a random high port which allows one to connect to the target device with a web browser using a %%URL%% of the form: | ||
- | |||
- | http://<ip address or name of target device>:<port #> | ||
- | |||
- | **For example:** | ||
- | |||
- | http://192.168.1.223:36070 | ||
- | |||
- | Once connected, you should see a single link in the upper right of the resulting web page, e.g.: | ||
- | |||
- | file:///opt/usr/apps/intelPoc15/res/wgt/index.html | ||
- | |||
- | Clicking that link will launch Webkit Web Inspector, a set of web development tools that should look familiar to users of Firefox Firebug or Chrome Dev Tools. Click the 'Console' icon in the toolbar to go to the Javascript console. Press ctrl-R, or type: | ||
- | |||
- | window.location.reload(); | ||
- | |||
- | ...to reload the application in order to display the startup/initialization functions associated with the app (since the app has already started by the time the debug interface is available). | ||
- | |||
- | To exit a running application, issue the following command with the application's App ID as an argument: | ||
- | |||
- | root:~> wrt-launcher -k intelPoc15.phone | ||
- | |||
- | **Instruction to the console:** | ||
- | |||
- | Assumptions these are all running from the Tizen platform and can access the console by SSH command or Control ALT F4 for a terminal. Tizen instructions are at Tizen.org | ||
- | |||
- | Install | ||
- | |||
- | wrt-installer -i intelPoc15.phone.wgt | ||
- | |||
- | Launch | ||
- | |||
- | wrt-installer -i intelPoc15.phone.wgt | ||
- | |||
- | |||
- | ===== Known Bugs ===== | ||
- | |||
- | |||
- | * Selecting previously discovered/cached phones will crash the widget. | ||
- | * Unpairing from the HU crashes the widget. You can restart it, but as long as you're shown as paired on the phone, you will not be able to re-pair again. | ||
- | * Performing a Scan from the widget does not find currently paired/selected phone. | ||
- | * There's currently no way to make the system "forget" a phone. This is especially a problem after unpairing through the phone's UI. (restarting will fix the issue) | ||
- | * After fully syncing with a phone, backing out of the Phone widget will disable/break the phone icon in the Home Screen. (though the Phone widget IS running in the background.) | ||
- | * Turn Off button seems to have no effect sometimes. (kill/restart widget will fix the issue) | ||
- | * If you stop a Scan, sometimes you will not be able to rescan from within the widget. (kill/restart widget will fix the issue) | ||
- | * Once Bluetooth has been Turned Off, Turning it back On again seems to turn it on, yet will not allow you to Scan. (kill/restart widget will fix the issue) | ||
- | * Widget initiates ActiveCall/Hangup messages in the background for no apparent reason. | ||
- | * Sometimes the phone will be automatically marked as Selected even after a fresh pairing. This will not allow you to select the phone and therefore will not sync contacts/call history. (widget issue likely) | ||
- | |||
- | |||
- | ===== Release History ===== | ||
- | |||
- | |||
- | |||
- | ==== Features ==== | ||
- | |||
- | |||
- | Features for the Audio Control home screen include the following: | ||
- | * Place call | ||
- | * Handles incoming calls passed from IncomingCall widget | ||
- | * Display call history | ||
- | * Display contact list | ||
- | * Mute/unmute call | ||
- | |||
- | |||
- | ==== Bug Fixes ==== | ||
- | |||
- | |||
- | * INTIVIPOCII-277 Phone call not shown as active when dialed via keypad) | ||
- | * INTIVIPOCII-45 Create build script to deploy and package applications from original Intel PoC (HomeScreen, Music player, Phone application, Store application, Settings, Dashboard, Google Navigation and Intel Navigation) | ||
- | * INTIVIPOCII-44 Handle incoming call scenario from paired smartphone (show widget and open Phone application on acceptance of call) | ||
- | * INTIVIPOCII-56 Integrate call log from paired phone (carousel) | ||
- | * INTIVIPOCII-55 Integrate phonebook from paired phone | ||
- | * INTIVIPOCII-58 C++ Provide call history of placed, missed and received phone calls with contact information | ||
- | * INTIVIPOCII-89 Remove paired smartphone | ||
- | * INTIVIPOCII-87 Pair new smartphone over Bluetooth with PIN entry | ||
- | * INTIVIPOCII-88 Mark phone as selected for incoming calls, call history etc | ||
- | * INTIVIPOCII-86 Display list of available smartphones over Bluetooth | ||
- | * INTIVIPOCII-372 Phone - User name not displayed when call received from other app than Phone | ||
- | * INTIVIPOCII-373 Phone - Phone call cannot be accepted from Navigation view | ||
- | * INTIVIPOCII-341 Phone - When call created from dialpad is ended, dialpad number field should be cleared | ||
- | * INTIVIPOCII-167 Phone - Volume cannot be adjusted | ||
- | * INTIVIPOCII-211 C++ Provide phonebook of contacts available on paired smartphone | ||
- | * INTIVIPOCII-212 C++ Invoke phone call on smartphone | ||
- | * INTIVIPOCII-214 C++ Get phone call status | ||
- | * INTIVIPOCII-213 C++ Signalize phone call from smartphone | ||
- | * INTIVIPOCII-216 C++ End/cancel phone call | ||
- | * INTIVIPOCII-217 C++ Accept/decline incoming phone call | ||
- | * INTIVIPOCII-220 On app startup/active check phone call status and switch app to normal/dialing/calling | ||
- | * INTIVIPOCII-215 C++ Mute/Unmute phone call | ||
- | * INTIVIPOCII-218 Integrate call log from paired phone (contact detail) | ||
- | * INTIVIPOCII-219 Invoke call from dialpad, carousel call history, phonebook | ||
- | * INTIVIPOCII-247 Phone - Accept/Reject phone call icons jump after clicking on them | ||
- | * INTIVIPOCII-258 Phone - Call accept/dismiss does not work from HomeScreen | ||
- | * INTIVIPOCII-257 Phone - Phone pop-up window is not dismissed and switched to Phone app, when incoming call is accepted/rejected from paired device | ||
- | * INTIVIPOCII-256 Phone - Long press in Phone dialer does not work | ||
- | * INTIVIPOCII-269 Phone - Incoming call cannot be accepted/rejected from NDIS in Music Player and Maps | ||
- | * INTIVIPOCII-267 Phone - Time count starts already during dialing while phone call is not accepted yet | ||
- | * INTIVIPOCII-331 refactoring phone | ||
- | * INTIVIPOCII-278 Phone - Phone app is closed when call started from Phone app ends | ||
- | * INTIVIPOCII-287 Implement service to sync phone data | ||
- | * INTIVIPOCII-307 Phone - End button not displayed when outgoing call made from directly from paired mobile phone | ||
- | * INTIVIPOCII-311 BT Settings - Phone still shown as paired even after pressing unpair | ||
- | * INTIVIPOCII-375 Phone - Application crashes after Mute button is pressed during ongoing call | ||
- | * INTIVIPOCII-368 Phone - After call ends view is not returned back to the application from which phone call was accepted | ||
- | * INTIVIPOCII-283 Phone - View of call number entered into dial pad is not scrolled when more numbers entered than is the filed size | ||
- | * C++ porting phoned to the bluez 5.12 API | ||