Hi
I have the same problem with Bo
There is codes in reference-ril.c
if ( fd >= 0 && !memcmp( s_device_path, "/dev/ttyS",
9 ) ) {<<<<maybe ttyS should be changed to ttyHS or ...
/* disable echo on serial ports */
struct termios ios;
tcgetattr( fd, &ios );
ios.c_lflag = 0; /* disable ECHO, ICANON, etc...
*/
tcsetattr( fd, TCSANOW, &ios );
}
in fact,I have changed '"ttyS" ,9' to'"ttyUSB,11"'(ttyUSB is my
device file ) ,but it still not work
Could anyone tell me how to do?
Thanks
--Weber
On 4月19日, 下午1时04分, Bo <[email protected]> wrote:
> Dear Sir:
>
> I want to make myRILimplementation (hardware/ril) work in the HTC
> dream unlock developer phone. I want the HTC dream android to use my /
> system/lib/libreference-ril.so instead of libhtc_ril.so
>
> From the posts of this group, I know it should work on android
> emulator by
> manually /system/bin/rild -l /system/lib/libreference-ril.so -- -d /
> dev/ttyS0
> or do it in init.rc
> serviceril-daemon /system/bin/rild -l /system/lib/libreference-ril.so
> -- -d
> /dev/ttyS0
> or the configure the rild.libpath and rild.libargs in the /out/target/
> product/dream-open/system/build.prop
> however, in the original file build.prop, it only indicate the
> rild.libpath=/system/lib/libhtc_ril.so, but does not indicate the
> parameter rild.libargs
>
> The problem is that in the /dev/ of HTC phone, I can not find ttyS0. I
> tried to use tty, ttyHS0, ttyMSM0 and ppp in folder /dev/ of HTC
> phone. It always reported RADIO_UNAVAILABLE in radio trace below.
>
> The code of main function of /hardware/ril/rild shows that the
> RIL_RadioFunctions of libhtc_ril.so got the tty device, but I do not
> have the code of libhtc_ril.so. So I do not which tty device HTC phone
> uses.
>
> I guess I selected wrong the serial device. Could anyone tell how to
> make my libreference-ril.so work on HTC phone instead of its
> libhtc_ril.so?
>
> I/RIL ( 33): Opening tty device /dev/ppp
> I/RILC ( 33): libril: new connection
> I/RILC ( 33):RILDaemon version: android reference-ril1.0
> I/RILJ ( 91): Connected to 'rild' socket
> D/RILJ ( 91): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED
> RADIO_UNAVAILABLE
> W/GSM ( 91): Can't open /system/etc/voicemail-conf.xml
> W/GSM ( 91): Can't open /system/etc/spn-conf.xml
> D/GSM ( 91): [DSAC DEB] registerForPsRestrictedEnabled
> D/GSM ( 91): [DSAC DEB] registerForPsRestrictedDisabled
> D/RILJ ( 91): [0000]> GET_CURRENT_CALLS
> D/RIL ( 33): onRequest: GET_CURRENT_CALLS
> D/RILJ ( 91): [0000]< GET_CURRENT_CALLS error:
> com.android.internal.telephony.gsm.CommandException:
> RADIO_NOT_AVAILABLE
> D/GSM ( 91): Poll ServiceState done: oldSS=[1 home null null
> null ] newSS=[1 home null null null ] oldGprs=1 newGprs=1
> oldType=unknown newType=unknown
> D/GSM ( 91): [DataConnectionTracker] Radio is off and clean up
> all connection
> D/GSM ( 91): [DataConnectionTracker] Clean up connection due to
> radioTurnedOff
> D/GSM ( 91): [DataConnection] Stop poll NetStat
> D/GSM ( 91): [DataConnectionTracker] setState: IDLE
> D/GSM ( 91): [DataConnection] Stop poll NetStat
> D/GSM ( 91): [DataConnectionTracker] ***trySetupData due to
> roamingOff
> D/GSM ( 91): [DSAC DEB] trySetupData with mIsPsRestricted=false
> D/GSM ( 91): [DataConnectionTracker] trySetupData: Not ready for
> data: dataState=IDLE gprsState=1 sim=false UMTS=false phoneState=IDLE
> dataEnabled=true roaming=false dataOnRoamingEnable=false ps
> restricted=false
> D/GSM ( 91): [GsmSimCard] Broadcasting intent
> SIM_STATE_CHANGED_ACTION NOT_READY reason null
>
> Thank you!
> Regards,
> BO
>
> --
> unsubscribe: [email protected]
> website:http://groups.google.com/group/android-porting
--
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting