Libsamsung-ril » History » Version 29
Paul Kocialkowski, 02/25/2013 09:02 PM
| 1 | 29 | Paul Kocialkowski | h1. Samsung-RIL |
|---|---|---|---|
| 2 | 1 | Paul Kocialkowski | |
| 3 | 29 | Paul Kocialkowski | Samsung-RIL is the Radio Interface Layer that implements the Samsung IPC protocol and interfaces [[libsamsung-ipc]] and the Android framework: |
| 4 | <pre> |
||
| 5 | Modem <=> Linux kernel <=> libsamsung-ipc <=> Samsung-RIL <=> Android framework <=> Android applications |
||
| 6 | </pre> |
||
| 7 | 1 | Paul Kocialkowski | |
| 8 | 29 | Paul Kocialkowski | Samsung-RIL is device-independent: it means that all the device-specific code takes place in [[libsamsung-ipc]], not in Samsung-RIL directly. |
| 9 | 1 | Paul Kocialkowski | |
| 10 | 29 | Paul Kocialkowski | h2. Development |
| 11 | 1 | Paul Kocialkowski | |
| 12 | 29 | Paul Kocialkowski | Samsung-RIL sources are hosted at: https://gitorious.org/replicant/hardware_ril_samsung-ril branch @master@ |
| 13 | It is aimed that Samsung-RIL can work on any Android version from gingerbread to jellybean in the master branch. |
||
| 14 | 1 | Paul Kocialkowski | |
| 15 | 29 | Paul Kocialkowski | h2. Status |
| 16 | |||
| 17 | Only GSM messages are supported for now: there is no CDMA support at all. |
||
| 18 | |||
| 19 | Global status: |
||
| 20 | |||
| 21 | |_. RIL request/response |_. Functionality |_. Status | |
||
| 22 | | RIL_REQUEST_GET_SIM_STATUS | SIM status report | Working | |
||
| 23 | | RIL_REQUEST_ENTER_SIM_PIN | SIM pin unlock | Working | |
||
| 24 | | RIL_REQUEST_ENTER_SIM_PUK | SIM puk unlock | Should work, untested | |
||
| 25 | | RIL_REQUEST_ENTER_SIM_PIN2 | SIM pin2 unlock | Should work, untested | |
||
| 26 | | RIL_REQUEST_ENTER_SIM_PUK2 | SIM puk unlock | Should work, untested | |
||
| 27 | | RIL_REQUEST_CHANGE_SIM_PIN | SIM pin change | Working | |
||
| 28 | | RIL_REQUEST_CHANGE_SIM_PIN2 | SIM pin2 change | Missing | |
||
| 29 | | RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION | ? | Missing | |
||
| 30 | | RIL_REQUEST_GET_CURRENT_CALLS | Current calls report | Working | |
||
| 31 | | RIL_REQUEST_DIAL | Outgoing call | Working | |
||
| 32 | | RIL_REQUEST_GET_IMSI | IMSI report | Working | |
||
| 33 | | RIL_REQUEST_HANGUP | End call | Working | |
||
| 34 | | RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND | End waiting/bg call | Missing | |
||
| 35 | | RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND | End current call and resume waiting call | Missing | |
||
| 36 | | RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE | Switch current/waiting-holding calls | Missing | |
||
| 37 | | RIL_REQUEST_SWITCH_HOLDING_AND_ACTIVE | Switch current/holding calls | Missing | |
||
| 38 | | RIL_REQUEST_CONFERENCE | Start a conference call | Missing | |
||
| 39 | | RIL_REQUEST_UDUB | Send user determined used busy | Missing | |
||
| 40 | | RIL_REQUEST_LAST_CALL_FAIL_CAUSE | Last call termination cause | Not working properly | |
||
| 41 | | RIL_REQUEST_SIGNAL_STRENGTH | Signal strength | Working | |
||
| 42 | | RIL_REQUEST_VOICE_REGISTRATION_STATE | GSM registration state report | Working | |
||
| 43 | | RIL_REQUEST_DATA_REGISTRATION_STATE | GPRS registration state report | Working | |
||
| 44 | | RIL_REQUEST_OPERATOR | Operator report | Working | |
||
| 45 | | RIL_REQUEST_RADIO_POWER | Modem power control | Working | |
||
| 46 | | RIL_REQUEST_DTMF | DTMF tones | Working | |
||
| 47 | | RIL_REQUEST_SEND_SMS | Send SMS | Working | |
||
| 48 | | RIL_REQUEST_SEND_SMS_EXPECT_MORE | Send multiple SMS | Working | |
||
| 49 | | RIL_REQUEST_SETUP_DATA_CALL | Start GPRS call | Working | |
||
| 50 | | RIL_REQUEST_SIM_IO | SIM I/O | Working | |
||
| 51 | | RIL_REQUEST_SEND_USSD | Send USSD message | Not working properly? | |
||
| 52 | | RIL_REQUEST_CANCEL_USSD | Cancel USSD | Should work | |
||
| 53 | | RIL_REQUEST_GET_CLIR | ? | Missing | |
||
| 54 | | RIL_REQUEST_SET_CLIR | ? | Missing | |
||
| 55 | | RIL_REQUEST_QUERY_CALL_FORWARD_STATUS | | | |
||
| 56 | | RIL_REQUEST_SET_CALL_FORWARD | | | |
||
| 57 | | RIL_REQUEST_QUERY_CALL_WAITING | | | |
||
| 58 | | RIL_REQUEST_SET_CALL_WAITING | | | |
||
| 59 | | RIL_REQUEST_SMS_ACKNOWLEDGE | | | |
||
| 60 | | RIL_REQUEST_GET_IMEI | | | |
||
| 61 | | RIL_REQUEST_GET_IMEISV | | | |
||
| 62 | | RIL_REQUEST_ANSWER | | | |
||
| 63 | | RIL_REQUEST_DEACTIVATE_DATA_CALL | | | |
||
| 64 | | RIL_REQUEST_QUERY_FACILITY_LOCK | | | |
||
| 65 | | RIL_REQUEST_SET_FACILITY_LOCK | | | |
||
| 66 | | RIL_REQUEST_CHANGE_BARRING_PASSWORD | | | |
||
| 67 | | RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE | | | |
||
| 68 | | RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC | | | |
||
| 69 | | RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL | | | |
||
| 70 | | RIL_REQUEST_QUERY_AVAILABLE_NETWORKS | | | |
||
| 71 | | RIL_REQUEST_DTMF_START | | | |
||
| 72 | | RIL_REQUEST_DTMF_STOP | | | |
||
| 73 | | RIL_REQUEST_BASEBAND_VERSION | | | |
||
| 74 | | RIL_REQUEST_SEPARATE_CONNECTION | | | |
||
| 75 | | RIL_REQUEST_SET_MUTE | | | |
||
| 76 | | RIL_REQUEST_GET_MUTE | | | |
||
| 77 | | RIL_REQUEST_QUERY_CLIP | | | |
||
| 78 | | RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE | | | |
||
| 79 | | RIL_REQUEST_DATA_CALL_LIST | | | |
||
| 80 | | RIL_REQUEST_RESET_RADIO | | | |
||
| 81 | | RIL_REQUEST_OEM_HOOK_RAW | | | |
||
| 82 | | RIL_REQUEST_OEM_HOOK_STRINGS | | | |
||
| 83 | | RIL_REQUEST_SCREEN_STATE | | | |
||
| 84 | | RIL_REQUEST_SET_SUPP_SVC_NOTIFICATION | | | |
||
| 85 | | RIL_REQUEST_WRITE_SMS_TO_SIM | | | |
||
| 86 | | RIL_REQUEST_DELETE_SMS_ON_SIM | | | |
||
| 87 | | RIL_REQUEST_SET_BAND_MODE | | | |
||
| 88 | | RIL_REQUEST_QUERY_AVAILABLE_BAND_MODE | | | |
||
| 89 | | RIL_REQUEST_STK_GET_PROFILE | | | |
||
| 90 | | RIL_REQUEST_STK_SET_PROFILE | | | |
||
| 91 | | RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND | | | |
||
| 92 | | RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE | | | |
||
| 93 | | RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM | | | |
||
| 94 | | RIL_REQUEST_EXPLICIT_CALL_TRANSFER | | | |
||
| 95 | | RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE | | | |
||
| 96 | | RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE | | | |
||
| 97 | | RIL_REQUEST_GET_NEIGHBORING_CELL_IDS | | | |
||
| 98 | | RIL_REQUEST_SET_LOCATION_UPDATES | | | |
||
| 99 | | RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE | | | |
||
| 100 | | RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE | | | |
||
| 101 | | RIL_REQUEST_CDMA_QUERY_ROAMING_PREFERENCE | | | |
||
| 102 | | RIL_REQUEST_SET_TTY_MODE | | | |
||
| 103 | | RIL_REQUEST_QUERY_TTY_MODE | | | |
||
| 104 | | RIL_REQUEST_CDMA_SET_PREFERRED_VOICE_PRIVACY_MODE | | | |
||
| 105 | | RIL_REQUEST_CDMA_QUERY_PREFERRED_VOICE_PRIVACY_MODE | | | |
||
| 106 | | RIL_REQUEST_CDMA_FLASH | | | |
||
| 107 | | RIL_REQUEST_CDMA_BURST_DTMF | | | |
||
| 108 | | RIL_REQUEST_CDMA_VALIDATE_AND_WRITE_AKEY | | | |
||
| 109 | | RIL_REQUEST_CDMA_SEND_SMS | | | |
||
| 110 | | RIL_REQUEST_CDMA_SMS_ACKNOWLEDGE | | | |
||
| 111 | | RIL_REQUEST_GSM_GET_BROADCAST_SMS_CONFIG | | | |
||
| 112 | | RIL_REQUEST_GSM_SET_BROADCAST_SMS_CONFIG | | | |
||
| 113 | | RIL_REQUEST_GSM_SMS_BROADCAST_ACTIVATION | | | |
||
| 114 | | RIL_REQUEST_CDMA_GET_BROADCAST_SMS_CONFIG | | | |
||
| 115 | | RIL_REQUEST_CDMA_SET_BROADCAST_SMS_CONFIG | | | |
||
| 116 | | RIL_REQUEST_CDMA_SMS_BROADCAST_ACTIVATION | | | |
||
| 117 | | RIL_REQUEST_CDMA_SUBSCRIPTION | | | |
||
| 118 | | RIL_REQUEST_CDMA_WRITE_SMS_TO_RUIM | | | |
||
| 119 | | RIL_REQUEST_CDMA_DELETE_SMS_ON_RUIM | | | |
||
| 120 | | RIL_REQUEST_DEVICE_IDENTITY | | | |
||
| 121 | | RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE | | | |
||
| 122 | | RIL_REQUEST_GET_SMSC_ADDRESS | | | |
||
| 123 | | RIL_REQUEST_SET_SMSC_ADDRESS | | | |
||
| 124 | | RIL_REQUEST_REPORT_SMS_MEMORY_STATUS | | | |
||
| 125 | | RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING | | | |
||
| 126 | | RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE | | | |
||
| 127 | | RIL_REQUEST_ISIM_AUTHENTICATION | | | |
||
| 128 | | RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU | | | |
||
| 129 | | RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS | | | |
||
| 130 | | RIL_UNSOL_RESPONSE_BASE | | | |
||
| 131 | | RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED | | | |
||
| 132 | | RIL_UNSOL_RESPONSE_CALL_STATE_CHANGED | | | |
||
| 133 | | RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED | | | |
||
| 134 | | RIL_UNSOL_RESPONSE_NEW_SMS | | | |
||
| 135 | | RIL_UNSOL_RESPONSE_NEW_SMS_STATUS_REPORT | | | |
||
| 136 | | RIL_UNSOL_RESPONSE_NEW_SMS_ON_SIM | | | |
||
| 137 | | RIL_UNSOL_ON_USSD | | | |
||
| 138 | | RIL_UNSOL_ON_USSD_REQUEST | | | |
||
| 139 | | RIL_UNSOL_NITZ_TIME_RECEIVED | | | |
||
| 140 | | RIL_UNSOL_SIGNAL_STRENGTH | | | |
||
| 141 | | RIL_UNSOL_DATA_CALL_LIST_CHANGED | | | |
||
| 142 | | RIL_UNSOL_SUPP_SVC_NOTIFICATION | | | |
||
| 143 | | RIL_UNSOL_STK_SESSION_END | | | |
||
| 144 | | RIL_UNSOL_STK_PROACTIVE_COMMAND | | | |
||
| 145 | | RIL_UNSOL_STK_EVENT_NOTIFY | | | |
||
| 146 | | RIL_UNSOL_STK_CALL_SETUP | | | |
||
| 147 | | RIL_UNSOL_SIM_SMS_STORAGE_FULL | | | |
||
| 148 | | RIL_UNSOL_SIM_REFRESH | | | |
||
| 149 | | RIL_UNSOL_CALL_RING | | | |
||
| 150 | | RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED | | | |
||
| 151 | | RIL_UNSOL_RESPONSE_CDMA_NEW_SMS | | | |
||
| 152 | | RIL_UNSOL_RESPONSE_NEW_BROADCAST_SMS | | | |
||
| 153 | | RIL_UNSOL_CDMA_RUIM_SMS_STORAGE_FULL | | | |
||
| 154 | | RIL_UNSOL_RESTRICTED_STATE_CHANGED | | | |
||
| 155 | | RIL_UNSOL_ENTER_EMERGENCY_CALLBACK_MODE | | | |
||
| 156 | | RIL_UNSOL_CDMA_CALL_WAITING | | | |
||
| 157 | | RIL_UNSOL_CDMA_OTA_PROVISION_STATUS | | | |
||
| 158 | | RIL_UNSOL_CDMA_INFO_REC | | | |
||
| 159 | | RIL_UNSOL_OEM_HOOK_RAW | | | |
||
| 160 | | RIL_UNSOL_RINGBACK_TONE | | | |
||
| 161 | | RIL_UNSOL_RESEND_INCALL_MUTE | | | |
||
| 162 | | RIL_UNSOL_CDMA_SUBSCRIPTION_SOURCE_CHANGED | | | |
||
| 163 | | RIL_UNSOL_CDMA_PRL_CHANGED | | | |
||
| 164 | | RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE | | | |
||
| 165 | | RIL_UNSOL_RIL_CONNECTED | | | |
||
| 166 | |||
| 167 | 6 | Denis 'GNUtoo' Carikli | |
| 168 | h1. libsamsung-ipc |
||
| 169 | 4 | Paul Kocialkowski | |
| 170 | 1 | Paul Kocialkowski | 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. |
| 171 | |||
| 172 | libsamsung-ipc is shared between SHR and Replicant projects. It's used in both for the Nexus S. |
||
| 173 | 25 | Denis 'GNUtoo' Carikli | |
| 174 | 1 | Paul Kocialkowski | Source code is available under the GPLv2+ at: https://github.com/morphis/libsamsung-ipc (master branch). |
| 175 | 6 | Denis 'GNUtoo' Carikli | |
| 176 | 4 | Paul Kocialkowski | The library is mostly complete |
| 177 | |||
| 178 | 1 | Paul Kocialkowski | h2. ipc-modemctrl |
| 179 | 5 | Denis 'GNUtoo' Carikli | |
| 180 | 1 | Paul Kocialkowski | 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). |
| 181 | |||
| 182 | 4 | Paul Kocialkowski | Usage: |
| 183 | 1 | Paul Kocialkowski | <pre> |
| 184 | usage: ipc-modemctrl <command> |
||
| 185 | commands: |
||
| 186 | start bootstrap modem and start read loop |
||
| 187 | power-on power on the modem |
||
| 188 | power-off power off the modem |
||
| 189 | 2 | Paul Kocialkowski | arguments: |
| 190 | --debug enable debug messages |
||
| 191 | 4 | Paul Kocialkowski | --pin=[PIN] provide SIM card PIN |
| 192 | 1 | Paul Kocialkowski | </pre> |
| 193 | |||
| 194 | Please run ipc-modemctrl like this (from host pc): |
||
| 195 | |||
| 196 | assuming your SIM PIN is 1234. If you don't have any SIM pin, don't pass the --pin argument. |
||
| 197 | |||
| 198 | 11 | Paul Kocialkowski | It should go like this: |
| 199 | 4 | Paul Kocialkowski | |
| 200 | 1 | Paul Kocialkowski | <pre> |
| 201 | 11 | Paul Kocialkowski | [I] Got SIM PIN! |
| 202 | [0] Starting modem on FMT client |
||
| 203 | [1] Starting modem_read_loop on FMT client |
||
| 204 | 1 | Paul Kocialkowski | [2] Phone is powered up (LPM)! |
| 205 | [I] SIM card found |
||
| 206 | 11 | Paul Kocialkowski | [I] SIM is initializing |
| 207 | [3] SIM init complete |
||
| 208 | 1 | Paul Kocialkowski | [4] Modem is ready, requesting normal power mode |
| 209 | 2 | Paul Kocialkowski | [I] SIM card found |
| 210 | 11 | Paul Kocialkowski | [I] SIM is initializing |
| 211 | [3] SIM init complete |
||
| 212 | 2 | Paul Kocialkowski | [5] Modem is fully ready |
| 213 | 11 | Paul Kocialkowski | [I] Registered with network successfully! |
| 214 | 4 | Paul Kocialkowski | [6] Registered with network! Got PLMN (Mobile Network Code): '20810' |
| 215 | 11 | Paul Kocialkowski | [I] Registered with network successfully! |
| 216 | 4 | Paul Kocialkowski | [6] Registered with network! Got PLMN (Mobile Network Code): '20810' |
| 217 | 2 | Paul Kocialkowski | [I] Registered with network successfully! |
| 218 | 11 | Paul Kocialkowski | [I] Registered with network successfully! |
| 219 | 2 | Paul Kocialkowski | [6] Registered with network! Got PLMN (Mobile Network Code): '20810' |
| 220 | [I] SIM Phone Book init complete |
||
| 221 | 4 | Paul Kocialkowski | </pre> |
| 222 | 28 | Denis 'GNUtoo' Carikli | |
| 223 | 4 | Paul Kocialkowski | h2. ipc-modemctrl Status |
| 224 | 3 | Paul Kocialkowski | |
| 225 | 4 | Paul Kocialkowski | We were able to make the following work: |
| 226 | * SMS (Rx/Tx) |
||
| 227 | * Call (Rx/Tx) BUT NO AUDIO YET |
||
| 228 | * GPRS |
||
| 229 | * SIM I/O (stored contacts, etc) |
||
| 230 | 1 | Paul Kocialkowski | * SIM PIN unlocking |