SmartDeviceLink In-Vehicle Software and Sample HMI
Switch branches/tags
4.4.1 archive/develop_20160928 coverity develop experimental/prepended_path feature/EngineOilLife feature/External_triggering_iAP_over_BT feature/FuelRange feature/agl_port feature/bluez5_support feature/boost_rwlock_implementation feature/boost_system_command_implementation feature/button_subscription_response_from_hmi feature/button feature/close_application_rpc feature/cloud_app_connection_flow feature/cloud_app_connection_status_disconnect feature/cloud_app_connection_status feature/cloud_app_policies feature/cloud_app_test feature/cloud_app_transport feature/cloudappvehicleid_param feature/experimental/remote_control feature/experimental/send_binary_vehicle_data feature/extended_policy_functionality feature/gps_shift_support feature/interior_vehicle_data_resumption feature/last_mile_navigation feature/malformed_messages_verification feature/media_skip_indicators feature/mobile_projection feature/new_remote_control_modules feature/open_menu_rpc feature/pixel_density_and_scale feature/pre_5_0_0_modifications feature/progress_bar_seek feature/put_file_crc feature/rc_new_modules feature/rc_refactoring feature/restructuring_OnResetTimeout feature/resumption_data_error_handling feature/rpc_design_refactoring feature/same_app_from_multiple_devices feature/sdl_on_qnx7_and_agl feature/sdl_passenger_mode feature/secure_websocket_connection feature/send_location feature/tire_pressure_additions feature/3rd_party_travis_cache fix/Add_missing_ssl_contex_h_include_in_security_manager_listener fix/Fix_log_severity_level_in_on_vehicle_data_notification_cc fix/Fix_messages_protocol_version_check fix/Move_app_launcher_stop_before_unregister_app fix/Prevent_creation_of_SSL_context_during_certificate_updating fix/Provide_operation_result_to_function_file_system_CreateDirectory fix/Remove_an_impossible_case_from_ProtocolHandlerImpl fix/Remove_unused_functionality_from_MediaManager fix/SDL_behavior_in_case_HMI_responds_with_WARNINGS_to_at_least_one_VR_DeleteCommands_AND_app_sends_PerfromInteraction_related_to_this_ChoiceSet fix/SDL_crash_during_cleanup_if_storage_not_initialized fix/SDL_does_not_respond_NACK_to_second_request fix/SDL_sends_twice_OnStatusUpdate_UPDATE_NEEDED_when_has_wrong_value_for_optional_parameter fix/Set_initialize_state_for_the_Interger_type fix/app_revoked_app_still_be_resumed_as_FULL fix/cloud_app_certificate_policies fix/cover_protocol_and_connection_handlers_with_unit_tests fix/default_policies_request_types fix/deprecated_macro_best_practice fix/does_not_send_GENERIC_ERROR_in_receiving_empty_gpsData fix/emulated_iap_transport_override fix/fix_Core_prematurely_sends_success_for_DeleteInteractionChoiceSet fix/fix_SDL_doesnt_deactivate_app_when_receives_OnEventChange_PHONE_CALL_from_HMI fix/fix_SDL_not_responses_REJECTED_to_PerfromInteraction fix/fix_protocol_v5_encrypted_frames fix/fix_sdl_crash_on_boot fix/fix_ssl_handshake_flow_integration_branch_final fix/fix_ssl_handshake_flow_integration_branch fix/hmi_api_capability_non_mandatory_fields fix/issue_2719 fix/issue_2720 fix/mem_seg_fault_error_in_jsoncpp_lib fix/mked.SDL_not_resume_subscribtion_status_on_wayPoint_data fix/module_type_default_policies_only fix/release_delegate_only_after_full_thread_stopping fix/remove_app_id_unsubscribe_vi fix/sdl_behavior_in_case_heartbeat_param_is_empty fix/sdl_does_not_unsubscribe_from_subbuttons_after_receiving_response fix/sdl_must_processing_systemrequest_for_requesttype_climate fix/sdl_must_restore_add_commands_in_the_order_they_were_created fix/sdl_not_restore_subscription_status_on_waypoint_related_data fix/sdl_send_retry_one_time_less fix/sdl_use_incorrect_url_on_system_request fix/start_stream_retry_count fix/update_supported_platforms fix/wrong_order_of_requests_on_device_disconnect fix/5.0.0-coverity hotfix/invalid_preset_bank_capabilities hotfix/local_pt_update hotfix/policy_manager_impl_tests hotfix/policy_manager_stress_test hotfix/policy_table_backup_proc hotfix/remove_policy_lib_check_for_activate_app hotfix/remove_usage_and_error_count_init_on_save hotfix/4.3_ptu_attach_binary_data master release/4.1_LTS release/4.3.0 release/4.4.0 release/4.4.2 release/4.5.0 release/4.5.1 release/4.5.2 release/5.0.0 release/5.0.1 revert-897-fix/rui_rejected_vr_unsupported_resource_delete_command
Nothing to show
Clone or download

README.md

Slack Status codecov.io Build Status

SmartDeviceLink (SDL)

SmartDeviceLink (SDL) is a standard set of protocols and messages that connect applications on a smartphone to a vehicle head unit. This messaging enables a consumer to interact with their application using common in-vehicle interfaces such as a touch screen display, embedded voice recognition, steering wheel controls and various vehicle knobs and buttons. There are three main components that make up the SDL ecosystem.

  • The Core component is the software which Vehicle Manufacturers (OEMs) implement in their vehicle head units. Integrating this component into their head unit and HMI based on a set of guidelines and templates enables access to various smartphone applications.
  • The optional SDL Server can be used by Vehicle OEMs to update application policies and gather usage information for connected applications.
  • The iOS and Android libraries are implemented by app developers into their applications to enable command and control via the connected head unit.

Pull Requests Welcome!

Documentation

SDL Core

The Core component of SDL runs on a vehicle's computing system (head unit). Core’s primary responsibility is to pass messages between connected smartphone applications and the vehicle HMI, and pass notifications from the vehicle to those applications. It can connect a smartphone to a vehicle's head unit via a variety of transport protocols such as Bluetooth, USB, Android AOA, and TCP. Once a connection is established, Core discovers compatible applications and displays them to the driver for interaction via voice or display. The core component is implemented into the vehicle HMI based on the integration guidelines above. The core component is configured to follow a set of policies defined in a policy database and updated by a policy server. The messaging between a connected application and core is defined by the Mobile API and the messaging between sdl core and the vehicle is defined by the HMI API.

Project Status

We're ramping up our efforts to get SmartDeviceLink developed and maintained directly in the open. For the Mobile libraries, we're expecting better integration soon, SDL Core is slightly more complicated. We are currently working on generating documentation, creating a developer portal, an open forum, Mobile validation, and everything else that we've been asked for to renew the community's interest in this project. From a technical standpoint, SDL is stable, and the most work is being put into making it a more robust solution for app connectivity. We are, however, definitely looking for and interested in other people and company's contributions to SDL whether it be feature based, bug fixes, healthy conversation, or even just suggestions for improvement.

Getting Started

A quick guide to installing, configuring, and running an instance of the SDL Core on a linux OS.

  1. Clone this repository
  2. Create a folder for your build outside of the source folder and run cmake {path_to_sdl_core_source_folder} from the build folder you created
  3. If there are any dependency issues, install missing dependencies
  4. Run the following commands to compile and install smartdevicelink
%make
%make install

Start SDL Core

Once SDL Core is compiled and installed you can start it from the executable in the bin folder

%cd bin/
%./start.sh

Start WEB HMI

Web HMI is separated from SDL Core and located in another repository. So to make it workable please do next steps.

  1. Clone http://github.com/smartdevicelink/sdl_hmi.git
  2. Follow the instruction from readme file in sdl_hmi repository.

A quick note about dependencies

The dependencies for SDL Core vary based on the configuration. You can change SDL Core's configuration in the top level CMakeLists.txt. We have defaulted this file to a configuration which we believe is common for people who are interested in getting up and running quickly, generally on a Linux VM.

Dependencies list

Flag Description Dependencies
Web HMI Use HTML5 HMI chromium-browser
EXTENDED_MEDIA_MODE Support Video and Audio Streaming Opengl es2, gstreamer1.0*
Bluetooth Enable bluetooth transport adapter libbluetooth3, libbluetooth-dev, bluez-tools
USB Enable USB transport adapter libusb-dev
Testing framework Needed to support running unit tests libgtest-dev
Cmake Needed to configure SDL prior to compilation cmake

Sample Policy Manager

The included sample policy manager (for use with EXTERNAL_PROPRIETARY policy mode) requires the following packages:

  • python-pip
  • python-dev

Known Dependency Issues

  • log4cxx - We know that the version of log4cxx on a linux machine can conflict with the one used, which is why it is provided in the repository. To avoid the conflict, we recommend removing liblog4cxx*.
  • cmake - on some versions of linux, the included cmake package doesn't have the right version. If apt-get is your package manager, you can find the correct version using
sudo apt-get install cmake
sudo add-apt-repository ppa:kalakris/cmake
sudo apt-get update
sudo apt-get upgrade

Required RPCs

There are several RPCs that are "required" to be implemented in order for SDL to work across vehicle manufacturers and applications, listed below. The RPC specification can be found in the Mobile API Spec.

  • RegisterAppInterface
  • UnregisterAppInterface
  • SetGlobalProperties
  • ResetGlobalProperties
  • AddCommand
  • DeleteCommand
  • AddSubMenu
  • DeleteSubMenu
  • CreateInteractionChoiceSet
  • PerformInteraction
  • DeleteInteractionChoiceSet
  • Alert
  • Show
  • SetMediaClockTimer
  • SubscribeButton
  • UnsubscribeButton
  • ChangeRegistration
  • GenericResponse
  • SystemRequest
  • OnHMIStatus
  • OnAppInterfaceUnregistered
  • OnButtonEvent
  • OnButtonPress
  • OnCommand
  • OnDriverDistraction
  • OnPermissionsChange
  • OnLanguageChange
  • OnSystemRequest
  • Speak

Frequently Asked Questions

If you have any questions regarding the setup of SDL Core or regarding the integration of SDL into an infotainment system, first visit our SDL Core FAQ. If you still have questions, you can post a question in the core-help channel of our Slack group (sign up here)

Test Coverage

Used technologies

  • GCOV - test coverage program.
  • LCOV - graphical front-end for GCC's coverage testing tool for gcov.
  • codecov.io - service for assembling code coverage and representing it in a clear for reading form.

Excluded folders

We test only sources written by us and we don`t need to test external sources(open source libraries).

  • '/usr/*' - local libraries shouldn`t be covered by tests.
  • '*/test/*' - we don`t need to cover tests.
  • '*/src/3rd*' - open source libraries shouldn`t be covered by tests.

Current test coverage

You can find it in Coverage report

How to get Test Coverage locally

  1. Build project with enabled flag -DBUILD_TESTS=on
  2. Execute command 'make test'
  3. Execute './tools/Utils/collect_coverage.sh <path_to_build_directory>'

Contributions

Conversation regarding the design and development of SmartDeviceLink technology should be directed at the GENIVI mailing list, which anyone can join. Public conference calls regarding the SmartDeviceLink technology will be announced to the GENIVI mailing list, we expect to have conversations every other week. We also encourage interested parties to write issues against our software, and submit pull requests right here in the GitHub repository.