Project

General

Profile

Actions

Samsung-RIL » History » Revision 29

« Previous | Revision 29/47 (diff) | Next »
Paul Kocialkowski, 02/25/2013 09:02 PM


Samsung-RIL

Samsung-RIL is the Radio Interface Layer that implements the Samsung IPC protocol and interfaces libsamsung-ipc and the Android framework:

Modem <=> Linux kernel <=> libsamsung-ipc <=> Samsung-RIL <=> Android framework <=> Android applications

Samsung-RIL is device-independent: it means that all the device-specific code takes place in libsamsung-ipc, not in Samsung-RIL directly.

Development

Samsung-RIL sources are hosted at: https://gitorious.org/replicant/hardware_ril_samsung-ril branch master
It is aimed that Samsung-RIL can work on any Android version from gingerbread to jellybean in the master branch.

Status

Only GSM messages are supported for now: there is no CDMA support at all.

Global status:

RIL request/response Functionality Status
RIL_REQUEST_GET_SIM_STATUS SIM status report Working
RIL_REQUEST_ENTER_SIM_PIN SIM pin unlock Working
RIL_REQUEST_ENTER_SIM_PUK SIM puk unlock Should work, untested
RIL_REQUEST_ENTER_SIM_PIN2 SIM pin2 unlock Should work, untested
RIL_REQUEST_ENTER_SIM_PUK2 SIM puk unlock Should work, untested
RIL_REQUEST_CHANGE_SIM_PIN SIM pin change Working
RIL_REQUEST_CHANGE_SIM_PIN2 SIM pin2 change Missing
RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION ? Missing
RIL_REQUEST_GET_CURRENT_CALLS Current calls report Working
RIL_REQUEST_DIAL Outgoing call Working
RIL_REQUEST_GET_IMSI IMSI report Working
RIL_REQUEST_HANGUP End call Working
RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND End waiting/bg call Missing
RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND End current call and resume waiting call Missing
RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE Switch current/waiting-holding calls Missing
RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE Switch current/holding calls Missing
RIL_REQUEST_CONFERENCE Start a conference call Missing
RIL_REQUEST_UDUB Send user determined used busy Missing
RIL_REQUEST_LAST_CALL_FAIL_CAUSE Last call termination cause Not working properly
RIL_REQUEST_SIGNAL_STRENGTH Signal strength Working
RIL_REQUEST_VOICE_REGISTRATION_STATE GSM registration state report Working
RIL_REQUEST_DATA_REGISTRATION_STATE GPRS registration state report Working
RIL_REQUEST_OPERATOR Operator report Working
RIL_REQUEST_RADIO_POWER Modem power control Working
RIL_REQUEST_DTMF DTMF tones Working
RIL_REQUEST_SEND_SMS Send SMS Working
RIL_REQUEST_SEND_SMS_EXPECT_MORE Send multiple SMS Working
RIL_REQUEST_SETUP_DATA_CALL Start GPRS call Working
RIL_REQUEST_SIM_IO SIM I/O Working
RIL_REQUEST_SEND_USSD Send USSD message Not working properly?
RIL_REQUEST_CANCEL_USSD Cancel USSD Should work
RIL_REQUEST_GET_CLIR ? Missing
RIL_REQUEST_SET_CLIR ? Missing
RIL_REQUEST_QUERY_CALL_FORWARD_STATUS
RIL_REQUEST_SET_CALL_FORWARD
RIL_REQUEST_QUERY_CALL_WAITING
RIL_REQUEST_SET_CALL_WAITING
RIL_REQUEST_SMS_ACKNOWLEDGE
RIL_REQUEST_GET_IMEI
RIL_REQUEST_GET_IMEISV
RIL_REQUEST_ANSWER
RIL_REQUEST_DEACTIVATE_DATA_CALL
RIL_REQUEST_QUERY_FACILITY_LOCK
RIL_REQUEST_SET_FACILITY_LOCK
RIL_REQUEST_CHANGE_BARRING_PASSWORD
RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE
RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC
RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL
RIL_REQUEST_QUERY_AVAILABLE_NETWORKS
RIL_REQUEST_DTMF_START
RIL_REQUEST_DTMF_STOP
RIL_REQUEST_BASEBAND_VERSION
RIL_REQUEST_SEPARATE_CONNECTION
RIL_REQUEST_SET_MUTE
RIL_REQUEST_GET_MUTE
RIL_REQUEST_QUERY_CLIP
RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE
RIL_REQUEST_DATA_CALL_LIST
RIL_REQUEST_RESET_RADIO
RIL_REQUEST_OEM_HOOK_RAW
RIL_REQUEST_OEM_HOOK_STRINGS
RIL_REQUEST_SCREEN_STATE
RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION
RIL_REQUEST_WRITE_SMS_TO_SIM
RIL_REQUEST_DELETE_SMS_ON_SIM
RIL_REQUEST_SET_BAND_MODE
RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE
RIL_REQUEST_STK_GET_PROFILE
RIL_REQUEST_STK_SET_PROFILE
RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND
RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE
RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM
RIL_REQUEST_EXPLICIT_CALL_TRANSFER
RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE
RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE
RIL_REQUEST_GET_NEIGHBORING_CELL_IDS
RIL_REQUEST_SET_LOCATION_UPDATES
RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE
RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE
RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE
RIL_REQUEST_SET_TTY_MODE
RIL_REQUEST_QUERY_TTY_MODE
RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE
RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE
RIL_REQUEST_CDMA_FLASH
RIL_REQUEST_CDMA_BURST_DTMF
RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY
RIL_REQUEST_CDMA_SEND_SMS
RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE
RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG
RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG
RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION
RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG
RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG
RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION
RIL_REQUEST_CDMA_SUBSCRIPTION
RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM
RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM
RIL_REQUEST_DEVICE_IDENTITY
RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE
RIL_REQUEST_GET_SMSC_ADDRESS
RIL_REQUEST_SET_SMSC_ADDRESS
RIL_REQUEST_REPORT_SMS_MEMORY_STATUS
RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING
RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE
RIL_REQUEST_ISIM_AUTHENTICATION
RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU
RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS
RIL_UNSOL_RESPONSE_BASE
RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED
RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED
RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
RIL_UNSOL_RESPONSE_NEW_SMS
RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT
RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM
RIL_UNSOL_ON_USSD
RIL_UNSOL_ON_USSD_REQUEST
RIL_UNSOL_NITZ_TIME_RECEIVED
RIL_UNSOL_SIGNAL_STRENGTH
RIL_UNSOL_DATA_CALL_LIST_CHANGED
RIL_UNSOL_SUPP_SVC_NOTIFICATION
RIL_UNSOL_STK_SESSION_END
RIL_UNSOL_STK_PROACTIVE_COMMAND
RIL_UNSOL_STK_EVENT_NOTIFY
RIL_UNSOL_STK_CALL_SETUP
RIL_UNSOL_SIM_SMS_STORAGE_FULL
RIL_UNSOL_SIM_REFRESH
RIL_UNSOL_CALL_RING
RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED
RIL_UNSOL_RESPONSE_CDMA_NEW_SMS
RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS
RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL
RIL_UNSOL_RESTRICTED_STATE_CHANGED
RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE
RIL_UNSOL_CDMA_CALL_WAITING
RIL_UNSOL_CDMA_OTA_PROVISION_STATUS
RIL_UNSOL_CDMA_INFO_REC
RIL_UNSOL_OEM_HOOK_RAW
RIL_UNSOL_RINGBACK_TONE
RIL_UNSOL_RESEND_INCALL_MUTE
RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED
RIL_UNSOL_CDMA_PRL_CHANGED
RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE
RIL_UNSOL_RIL_CONNECTED

libsamsung-ipc

libsamsung-ipc is a free implementation of the protocol to speak with modems found in most Samsung devices. It is the low-level library used to communicate with the modem and needs an upper-layer (RIL) to interface with the system.

libsamsung-ipc is shared between SHR and Replicant projects. It's used in both for the Nexus S.

Source code is available under the GPLv2+ at: https://github.com/morphis/libsamsung-ipc (master branch).

The library is mostly complete

ipc-modemctrl

ipc-modemctrl is a deprecated tool that was used at the beginning of the work for talking to the nexus S modem. It implemented basic functionalities (mostly SIM unlocking and network registration).

Usage:

usage: ipc-modemctrl <command>
commands:
    start                 bootstrap modem and start read loop
    power-on              power on the modem
    power-off             power off the modem
arguments:
    --debug               enable debug messages
    --pin=[PIN]           provide SIM card PIN

Please run ipc-modemctrl like this (from host pc):

assuming your SIM PIN is 1234. If you don't have any SIM pin, don't pass the --pin argument.

It should go like this:

[I] Got SIM PIN!
[0] Starting modem on FMT client
[1] Starting modem_read_loop on FMT client
[2] Phone is powered up (LPM)!
[I] SIM card found
[I] SIM is initializing
[3] SIM init complete
[4] Modem is ready, requesting normal power mode
[I] SIM card found
[I] SIM is initializing
[3] SIM init complete
[5] Modem is fully ready
[I] Registered with network successfully!
[6] Registered with network! Got PLMN (Mobile Network Code): '20810'
[I] Registered with network successfully!
[6] Registered with network! Got PLMN (Mobile Network Code): '20810'
[I] Registered with network successfully!
[I] Registered with network successfully!
[6] Registered with network! Got PLMN (Mobile Network Code): '20810'
[I] SIM Phone Book init complete

ipc-modemctrl Status

We were able to make the following work:
  • SMS (Rx/Tx)
  • Call (Rx/Tx) BUT NO AUDIO YET
  • GPRS
  • SIM I/O (stored contacts, etc)
  • SIM PIN unlocking

Updated by Paul Kocialkowski over 6 years ago · 29 revisions