Hi, I am trying to use a sierra wireless modem on android and i encountered the same problems as you did and resolved part of those with this procedure:
hardware/ril/libril/ril.cpp First #if 0 to #if 1 Removes can't connect to rild socket, but now we have can't connect to rild-debug Comment next #else Removes can't connect to rild-debug socket hardware/ril/rild/rild.c /* special override when in the emulator */ #if 1 { to /* special override when in the emulator */ #if 0 { /system/core/init/devices.c { "/dev/ttyACM0", 0660, AID_RADIO, AID_RADIO, 0 }, /init.rc loglevel 4 instead of 3 service ril-daemon /system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ttyS0 I still have some issues though: it seems that either my igep board or the sierra wireless modem is too slow for the other as i have several AT ERRORS (see log http://pastebin.com/YRJBfBYV). Any help on this log will very much appreciated. Plus i am trying to find info on setting up APNs. On 11 mai, 14:55, "Jacky.Seraph Mun" <jackyser...@gmail.com> wrote: > ---------- Forwarded message ---------- > From: Jacky.Seraph Mun <jackyser...@gmail.com> > Date: 2011/5/11 > Subject: Re: [android-porting] RIL stalls when setting /dev/ttyS0 > permisions in init.rc > To: jehangir parvereshi <jehangir.parvere...@avagotech.com> > > First of all > >>> > From adb shell: > >>> > $chown system.radio /dev/ttyS0 > >>> > enables RIL services and can make phone calls. > > >>> > Similar entry in init.rc : > >>> > chown system radio /dev/ttyS0 > >>> > does not enable RIL services: > > Did you check the owner ship of /dev/ttyS0 again after you set it in > the init.rc and restarted? Was it the correct value still? > > Secondly > According to your log, there should be 2 problems: > > 1. > > I/RILC ( 986): RIL Daemon version: android reference-ril 1.0 > I/RILJ ( 1145): Connected to 'rild' socket > D/RILJ ( 1145): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED > RADIO_UNAVAILABLE > > The last line above indicates that RIL.java has created the socket to > RIL daemon and received the first Unsolicited command from the daemon > to ask RIL.java to reset the Radio Power to be off. So in the next > normal step, the RIL.java should call > > private void setRadioStateFromRILInt(int state) { > ... > if (mInitialRadioStateChange) { > mInitialRadioStateChange = false; > if (newState.isOn()) { > /* If this is our first notification, make sure the radio > * is powered off. This gets the radio into a known state, > * since it's possible for the phone proc to have restarted > * (eg, if it or the runtime crashed) without the RIL > * and/or radio knowing. > */ > if (DBG) Log.d(LOG_TAG, "Radio ON @ init; reset to OFF"); > setRadioPower(false, null); > return; > } > } > ... > } > > By default in froyo (android 2.2 or eclair 2.1), both the DBG and the > mInitialRadioStateChange should be true at that time. So there is > supposed to be the log as below: > D/RILJ (..): Radio ON @ init; reset to OFF > after the last line of the above 3. > > I am not sure why this log is missing in yours and neither do I check > the 2.3 code. So maybe you have to check that part. > > 2. > > I/RIL ( 986): Opening tty device /dev/ttyS0 > > According the line, the RIL daemon is trying to open ttyS0 as to > connect to the GSM modem. If it is successfully opened, it should do > the AT handshake subsequently and there should be the log info as > "AT>...". So maybe you have to either add more log info in reference-ril.c > > static void * > mainLoop(void *param) > { > ... > } else if (s_device_path != NULL) { > fd = open (s_device_path, O_RDWR); > if ( fd >= 0 && !memcmp( s_device_path, "/dev/ttyS", 9 ) ) { > /* disable echo on serial ports */ > struct termios ios; > tcgetattr( fd, &ios ); > ios.c_lflag = 0; /* disable ECHO, ICANON, etc... */ > if( cfsetispeed( &ios, B115200) != 0 ) > printf("Failed to set in speed\n"); > if ( cfsetospeed( &ios, B115200) != 0 ) > printf("Failed to set out speed\n"); > tcsetattr( fd, TCSANOW, &ios ); > } > } > > ////////////////// add here! > // log the the fd and the "errno" if fd < 0 > // LOGI("Opened tty device %d, errno=%d", fd, errno); > ////////////////// > > if (fd < 0) { > perror ("opening AT interface. retrying..."); > sleep(10); > /* never returns */ > } > ... > } > > or make sure the atchannel.c can out put the related "AT>" log. > > Jack > > 2011/5/11 jehangir parvereshi <jehangir.parvere...@avagotech.com>: > > Hi Jack, > > I am also attaching the reference-ril.c file. > > Thanks, > > JP > > > On Tue, May 10, 2011 at 10:05 AM, jehangir parvereshi > > <jehangir.parvere...@avagotech.com> wrote: > > >> Hi Jack, > >> Here's the log file: > >> ===== > >> # logcat -b radio > >> logcat -b radio > >> I/RIL ( 986): Hello World > >> I/RIL ( 986): Opening tty device /dev/ttyS0 > >> I/PHONE ( 1145): Network Mode set to 0 > >> I/PHONE ( 1145): Cdma Subscription set to 1 > >> I/RILC ( 986): libril: new connection > >> I/RILC ( 986): RIL Daemon version: android reference-ril 1.0 > >> I/RILJ ( 1145): Connected to 'rild' socket > >> D/RILJ ( 1145): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED > >> RADIO_UNAVAILABLE > >> I/PHONE ( 1145): Creating GSMPhone > >> D/PHONE ( 1145): mDoesRilSendMultipleCallRing=true > >> D/PHONE ( 1145): mCallRingDelay=3000 > >> W/GSM ( 1145): Can't open /system/etc/voicemail-conf.xml > >> W/GSM ( 1145): Can't open /system/etc/spn-conf.xml > >> D/GSM ( 1145): [DSAC DEB] registerForPsRestrictedEnabled > >> D/GSM ( 1145): [DSAC DEB] registerForPsRestrictedDisabled > >> D/GSM ( 1145): [GsmDataConnection-1] DataConnection constructor E > >> D/GSM ( 1145): [GsmDataConnection-1] clearSettings > >> D/GSM ( 1145): [GsmDataConnection-1] DataConnection constructor X > >> D/GSM ( 1145): [GsmDataConnection-1] Made GsmDataConnection-1 > >> D/RILJ ( 1145): [0000]> RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING > >> D/STK ( 1145): StkService: StkService: is running > >> D/STK ( 1145): StkService: NEW sInstance > >> E/RILJ ( 1145): ERROR: mReqPending is NOT 0 but1 at TIMEOUT, reset! > >> D/RIL ( 986): onRequest: REPORT_STK_SERVICE_IS_RUNNING > >> D/RILJ ( 1145): [0000]< RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING > >> error: com. > >> android.internal.telephony.CommandException: RADIO_NOT_AVAILABLE > >> D/RILJ ( 1145): [0001]> GET_CURRENT_CALLS > >> E/RILJ ( 1145): ERROR: mReqPending is NOT 0 but1 at TIMEOUT, reset! > >> E/GSM ( 1145): Wrong network type: 0 > >> E/GSM ( 1145): Wrong network type: 0 > >> D/GSM ( 1145): Poll ServiceState done: oldSS=[1 home null null null > >> Unknow > >> n CSS not supported 0 0RoamInd: 0DefRoamInd: 0EmergOnly: false] newSS=[1 > >> home nu > >> ll null null Unknown CSS not supported -1 -1RoamInd: -1DefRoamInd: > >> -1EmergOnly: > >> false] oldGprs=1 newGprs=1 oldType=unknown newType=unknown > >> D/RIL ( 986): onRequest: GET_CURRENT_CALLS > >> D/RILJ ( 1145): [0001]< GET_CURRENT_CALLS error: > >> com.android.internal.telepho > >> ny.CommandException: RADIO_NOT_AVAILABLE > >> D/GSM ( 1145): [GsmDataConnection-1] DcInactiveState: > >> msg.what=EVENT_RESET, > >> ignore we're already reset > >> D/GSM ( 1145): [GsmDataConnection-1] NotifyDisconnectCompleted > >> D/GSM ( 1145): [GsmDataConnection-1] clearSettings > >> D/GSM ( 1145): [DataConnection] Stop poll NetStat > >> D/GSM ( 1145): [DataConnection] Stop poll NetStat > >> D/GSM ( 1145): [DSAC DEB] trySetupData with mIsPsRestricted=false > >> D/GSM ( 1145): [IccCard] Broadcasting intent ACTION_SIM_STATE_CHANGED > >> NOT_RE > >> ADY reason null > >> D/RILJ ( 1145): [0002]> SCREEN_STATE: true > >> E/RILJ ( 1145): ERROR: mReqPending is NOT 0 but1 at TIMEOUT, reset! > >> D/RIL ( 986): onRequest: SCREEN_STATE > >> D/RILJ ( 1145): [0002]< SCREEN_STATE error: > >> com.android.internal.telephony.Co > >> mmandException: RADIO_NOT_AVAILABLE > >> D/GSM ( 1145): [DataConnection] Stop poll NetStat > >> ========================= > >> Thank, > >> JP > > >> On Tue, May 10, 2011 at 9:02 AM, Jacky.Seraph Mun <jackyser...@gmail.com> > >> wrote: > > >>> Are you sure it's the permission problem that resulted in the failure > >>> of enabling RIL daemon? What's the radio log saying? > >>> And maybe you can try "chown radio /dev/..." instead. > > >>> Jack > > >>> 2011/5/10 JP <j...@avagotech.com>: > >>> > Hi All, > >>> > I'm new to Android and am confounded with this RIL/phone services > >>> > issue in Gingerbread 2.3.3. > >>> > Kernel : 2.6.32. Any help/guidance will be much appreciated. > > >>> > From adb shell: > >>> > $chown system.radio /dev/ttyS0 > >>> > enables RIL services and can make phone calls. > > >>> > Similar entry in init.rc : > >>> > chown system radio /dev/ttyS0 > >>> > does not enable RIL services: > > >>> > adb_shell> logcat -b radio > >>> > D/RILJ> WAKE_LOCK_TIMEOUT mRequestList=5 > > >>> > I've attached the init.rc file, below. > > >>> > If init.rc is not the right location, please suggest which file should > >>> > I set "chown for /dev/ttyS0" in. > > >>> > Thanks, > >>> > JP > > >>> > on early-init > >>> > symlink /initlogo.rle.keep /initlogo.rle > >>> > start ueventd > > >>> > on init > >>> > sysclktz 0 > >>> > loglevel 3 > > >>> > # setup the global environment > >>> > export PATH /sbin:/system/sbin:/system/bin:/system/xbin > >>> > export LD_LIBRARY_PATH /system/lib > >>> > export ANDROID_BOOTLOGO 1 > >>> > export ANDROID_ROOT /system > >>> > export ANDROID_ASSETS /system/app > >>> > export ANDROID_DATA /data > >>> > export EXTERNAL_STORAGE /mnt/sdcard > >>> > export ASEC_MOUNTPOINT /mnt/asec > >>> > export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ > >>> > bouncycastle.jar:/system/framework/ext.jar:/system/framework/ > >>> > framework.jar:/system/framework/android.policy.jar:/system/framework/ > >>> > services.jar:/system/framework/core-junit.jar > > >>> > # fake some battery state > >>> > setprop status.battery.state Slow > >>> > setprop status.battery.level 5 > >>> > setprop status.battery.level_raw 50 > >>> > setprop status.battery.level_scale 9 > > >>> > # Backward compatibility > >>> > symlink /system/etc /etc > >>> > symlink /sys/kernel/debug /d > > >>> > # create > > ... > > plus de détails » -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting