Project

General

Profile

Libsamsung-ril » History » Revision 29

Revision 28 (Denis 'GNUtoo' Carikli, 12/03/2012 09:46 PM) → Revision 29/48 (Paul Kocialkowski, 02/25/2013 09:02 PM)

h1. Samsung-RIL samsung-ril 

 Samsung-RIL The samsung ril is the Radio Interface Layer library that implements the Samsung IPC protocol and interfaces [[libsamsung-ipc]] and libsamsung-ipc(see below) with the Android framework: 
 <pre> 
 Modem <=> Linux kernel <=> libsamsung-ipc <=> Samsung-RIL <=> Android framework <=> Android applications 
 </pre> android framework. 

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

 h2. Development Supported devices 

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

 h2. Status Features 

 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 |_. Release status report    | Working | 
 | RIL_REQUEST_ENTER_SIM_PIN Modem bootstrap | SIM pin unlock | Working | 
 Released | RIL_REQUEST_ENTER_SIM_PUK | SIM puk unlock | Should work, untested | 
 | RIL_REQUEST_ENTER_SIM_PIN2 Modem transport | SIM pin2 unlock Working | Should work, untested Released | 
 | RIL_REQUEST_ENTER_SIM_PUK2 Modem FMT | SIM puk unlock Working | Should work, untested Released | 
 | RIL_REQUEST_CHANGE_SIM_PIN Modem RFS | SIM pin change | Working | 
 Released | RIL_REQUEST_CHANGE_SIM_PIN2 | SIM pin2 change | Missing | 
 | RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION Power to Normal (Airplane mode on) | ? | Missing | 
 | RIL_REQUEST_GET_CURRENT_CALLS | Current calls report | Working | 
 Released | RIL_REQUEST_DIAL | Outgoing call | Working | 
 | RIL_REQUEST_GET_IMSI Power to LPM (Airplane mode off) | IMSI report | Working | 
 Released | RIL_REQUEST_HANGUP | End call | Working | 
 | RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND RSSI infos | 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 | 
 Released | RIL_REQUEST_VOICE_REGISTRATION_STATE | GSM registration state report | Working | 
 | RIL_REQUEST_DATA_REGISTRATION_STATE Icon infos | GPRS registration state report | Working | 
 Released | RIL_REQUEST_OPERATOR | Operator report | Working | 
 | RIL_REQUEST_RADIO_POWER | Modem power control firmware infos | Working | 
 Released | RIL_REQUEST_DTMF | DTMF tones | Working | 
 | RIL_REQUEST_SEND_SMS IMEI/IMEISV | Send SMS | Working | 
 Released | RIL_REQUEST_SEND_SMS_EXPECT_MORE | Send multiple SMS | Working | 
 | RIL_REQUEST_SETUP_DATA_CALL IMSI | Start GPRS call | Working | 
 Released | RIL_REQUEST_SIM_IO | SIM I/O | Working | 
 | RIL_REQUEST_SEND_USSD | Send USSD message | Not working properly? Working, needs testing | 
 Released | RIL_REQUEST_CANCEL_USSD | Cancel USSD | Should work | 
 | RIL_REQUEST_GET_CLIR SIM PIN unlock | ? Working | Missing Released | 
 | RIL_REQUEST_SET_CLIR SIM PIN set | ? Working | Missing Released | 
 | RIL_REQUEST_QUERY_CALL_FORWARD_STATUS SIM PIN change |    Working |    Released | 
 | RIL_REQUEST_SET_CALL_FORWARD SIM unlock with PUK |    Working |    Released | 
 | RIL_REQUEST_QUERY_CALL_WAITING SIM I/O |    Partially working: infos, contacts are OK, stored SMS I/O is not |    Released | 
 | RIL_REQUEST_SET_CALL_WAITING Network registration |    Working |    Released | 
 | RIL_REQUEST_SMS_ACKNOWLEDGE Operator strings |    Working |    Released | 
 | RIL_REQUEST_GET_IMEI Network type force |    Working |    Released | 
 | RIL_REQUEST_GET_IMEISV Operator manual select |    Working |    Released | 
 | RIL_REQUEST_ANSWER SMS outgoing |    Working |    Released | 
 | RIL_REQUEST_DEACTIVATE_DATA_CALL SMS incoming |    Working |    Released | 
 | RIL_REQUEST_QUERY_FACILITY_LOCK Call incoming |    Working |    Released | 
 | RIL_REQUEST_SET_FACILITY_LOCK Call outgoing |    Working, but conferencing |    Released | 
 | RIL_REQUEST_CHANGE_BARRING_PASSWORD DTMF |    Working |    Released | 
 | RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE Audio during calls |    Working |    Released | 
 | RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC Audio mic mute set |    Working |    Released | 
 | RIL_REQUEST_SET_NETWORK_SELECTION_MANUAL Audio volume change |    Working |    Released | 
 | RIL_REQUEST_QUERY_AVAILABLE_NETWORKS Audio path change |    Working |    Released | 
 | RIL_REQUEST_DTMF_START Data activation |    Working |    Released | 
 | RIL_REQUEST_DTMF_STOP Data deactivation |    Working |    Released | 
 | RIL_REQUEST_BASEBAND_VERSION NV read item |    Working |    Released | 
 | RIL_REQUEST_SEPARATE_CONNECTION NV write item |    Working |    Released | 
 | 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 |    |    | 


 

 h1. 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 

 h2. 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: 
 <pre> 
 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 
 </pre> 

 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: 

 <pre> 
 [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 
 </pre> 

 h2. 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