Hi, David Turner , thanks. It's my kernel driver for ttyVSP0 make kernel panic.Now i can make a MT or MO call, and receive SMS.
BUT, there are another three questions, please give me some advice: (1) If a MT call happening , no prompt in android UI. If a new message received , no prompt in android UI. How to make prompt automaticly in my android UI ? whether do i need modify some JAVA code? (2) If i get a MT call, i can't get voice. How can i get voice? (3) I can't send message, logcat : D/RILJ ( 474): [0352]< SIGNAL_STRENGTH {27, 99} D/RILJ ( 474): WAKE_LOCK_TIMEOUT mReqPending=0 mRequestList=1 D/RILJ ( 474): 0: [18] SET_NETWORK_SELECTION_AUTOMATIC D/RILJ ( 474): [0353]> SIGNAL_STRENGTH D/RIL ( 426): onRequest: SIGNAL_STRENGTH I/RIL ( 426): onRequest: 19 D/AT ( 426): AT> AT+CSQ D/AT ( 426): AT< +CSQ: 27,99 D/AT ( 426): AT< OK D/RILJ ( 474): [0353]< SIGNAL_STRENGTH {27, 99} D/GSM ( 474): SMS send size=0time=1013111 D/RILJ ( 474): [0354]> SEND_SMS D/RIL ( 426): onRequest: SEND_SMS I/RIL ( 426): onRequest: 25 D/AT ( 426): AT> AT+CMGS=17 D/AT ( 426): AT< > D/AT ( 426): AT> 0001000b813157341217f20000045abd560f^Z D/AT ( 426): AT< Q: 27,99 D/AT ( 426): AT< +CMS ERROR: 41 D/RILJ ( 474): [0354]< SEND_SMS error: com.android.internal.telephony.gsm.CommandException: GENERIC_FAILURE D/GSM ( 474): SMS send failed D/RILJ ( 474): WAKE_LOCK_TIMEOUT mReqPending=0 mRequestList=1 D/RILJ ( 474): 0: [18] SET_NETWORK_SELECTION_AUTOMATIC D/RILJ ( 474): [0355]> SIGNAL_STRENGTH D/RIL ( 426): onRequest: SIGNAL_STRENGTH I/RIL ( 426): onRequest: 19 D/AT ( 426): AT> AT+CSQ D/AT ( 426): AT< +CSQ: 23,99 D/AT ( 426): AT< OK D/RILJ ( 474): [0355]< SIGNAL_STRENGTH {23, 99} D/RILJ ( 474): WAKE_LOCK_TIMEOUT mReqPending=0 mRequestList=1 D/RILJ ( 474): 0: [18] SET_NETWORK_SELECTION_AUTOMATIC D/RILJ ( 474): [0356]> SIGNAL_STRENGTH D/RIL ( 426): onRequest: SIGNAL_STRENGTH I/RIL ( 426): onRequest: 19 D/AT ( 426): AT> AT+CSQ D/AT ( 426): AT< +CSQ: 23,99 D/AT ( 426): AT< OK D/RILJ ( 474): [0356]< SIGNAL_STRENGTH {23, 99} D/GSM ( 474): SMS send size=1time=1052839 D/RILJ ( 474): [0357]> SEND_SMS D/RIL ( 426): onRequest: SEND_SMS I/RIL ( 426): onRequest: 25 D/AT ( 426): AT> AT+CMGS=18 D/AT ( 426): AT< > D/AT ( 426): AT> 0001000d91683157341217f20000045abd560f^Z D/RILJ ( 474): WAKE_LOCK_TIMEOUT mReqPending=0 mRequestList=2 D/RILJ ( 474): 0: [18] SET_NETWORK_SELECTION_AUTOMATIC D/RILJ ( 474): 1: [357] SEND_SMS D/RILJ ( 474): [0358]> SIGNAL_STRENGTH D/RILJ ( 474): WAKE_LOCK_TIMEOUT mReqPending=0 mRequestList=3 D/RILJ ( 474): 0: [18] SET_NETWORK_SELECTION_AUTOMATIC D/RILJ ( 474): 1: [357] SEND_SMS D/RILJ ( 474): 2: [358] SIGNAL_STRENGTH D/AT ( 426): AT< Q: 23,99 D/AT ( 426): AT< +CMS ERROR: 41 D/RIL ( 426): onRequest: SIGNAL_STRENGTH I/RIL ( 426): onRequest: 19 D/AT ( 426): AT> AT+CSQ D/RILJ ( 474): [0357]< SEND_SMS error: com.android.internal.telephony.gsm.CommandException: GENERIC_FAILURE D/GSM ( 474): SMS send failed D/AT ( 426): AT< +CSQ: 23,99 D/AT ( 426): AT< OK D/RILJ ( 474): [0358]< SIGNAL_STRENGTH {23, 99} On 2月20日, 下午4时10分, Jack stone <lsb6...@sina.com> wrote: > David Turner , thank for your reply. > And now my /dev/ttyVSP0 can't be opened in android, if it is > opened ,then kernel panic. It' s big problem. > > By the way, if /dev/ttyVSP0(a char device map to uart 0) driver works > well, i just need to implement reference-ril.c, such as(1) change the > Open() device,(2)modify AT command for my GSM module. Like this , > radio will work. > > If i need to modify other files under ril directory? > > On 2月20日, 上午6时18分, David Turner <di...@android.com> wrote: > > > > > the value of errno should give you more information about the error. I > > suspect a permission problem, but I don't know how these are setup in the > > system for device files. > > > On Thu, Feb 19, 2009 at 11:04 AM, dephon...@gmail.com > > <dephon...@gmail.com>wrote: > > > > Hi, all: > > > > I am porting Android GSM CALL function to my EVB. I have a /dev/ > > > ttyVSP0 device which used to send AT command. > > > > But fd = open ("/dev/ttyVSP0", O_RDWR); always returen -1 in mainLoop > > > () (locate in reference-ril.c). > > > > My code looks like this: > > > > static void * mainLoop(void *param) //reference-ril.c > > > > {..... > > > > while (fd < 0) { > > > > if (s_port > 0) { > > > > fd = socket_loopback_client(s_port, SOCK_STREAM); > > > > LOGI("mainLoop 111\n"); > > > > } else if (s_device_socket) { > > > > fd = socket_local_client( s_device_path, > > > > ANDROID_SOCKET_NAMESPACE_FILESYSTEM, > > > > SOCK_STREAM ); > > > > LOGI("mainLoop 222\n"); > > > > } else if (s_device_path != NULL) { > > > > LOGI("mainLoop 333\n"); > > > > fd = open (s_device_path, O_RDWR); > > > > LOGI("mainLoop open return %d.\n", fd); > > > > if ( fd >= 0 && !memcmp( s_device_path, "/dev/ > > > ttyVSP0", 12 ) ) { > > > > /* disable echo on serial ports */ > > > > struct termios ios; > > > > tcgetattr( fd, &ios ); > > > > ios.c_lflag = 0; /* disable ECHO, ICANON, etc... > > > */ > > > > tcsetattr( fd, TCSANOW, &ios ); > > > > LOGI("mainLoop 444\n"); > > > > } > > > > } > > > > if (fd < 0) { > > > > perror ("opening AT interface. retrying..."); > > > > LOGI("mainLoop 555\n"); > > > > sleep(10); > > > > /* never returns */ > > > > } > > > > else > > > > { > > > > LOGI("mainLoop exit while\n"); > > > > } > > > > ...... > > > } > > > > My debug info is (Just get by: logcat -b radio) > > > > # logcat -b radio > > > > I/RIL ( 408): Opening tty device /dev/ttyVSP0 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RILJ ( 455): Connected to 'rild' socket > > > > I/RILC ( 408): libril: new connection > > > > I/RILC ( 408): RIL Daemon version: zmzmzm reference-ril 1.0 > > > > D/RILJ ( 455): [UNSL]< UNSOL_RESPONSE_RADIO_STATE_CHANGED > > > RADIO_UNAVAILABLE > > > > W/GSM ( 455): Can't open /system/etc/voicemail-conf.xml > > > > D/RILJ ( 455): [0000]> GET_CURRENT_CALLS > > > > D/GSM ( 455): Poll ServiceState done: oldSS=[1 home null null > > > null ] newSS=[1 home null null null ] oldGprs=1 newGprs=1 > > > oldType=unknown newType=unknown > > > > D/RIL ( 408): onRequest: GET_CURRENT_CALLS > > > > D/RILJ ( 455): [0000]< GET_CURRENT_CALLS error: > > > com.android.internal.telephony.gsm.CommandException: > > > RADIO_NOT_AVAILABLE > > > > D/GSM ( 455): [DataConnectionTracker] Radio is off and clean up > > > all connection > > > > D/GSM ( 455): [DataConnectionTracker] Clean up connection due to > > > radioTurnedOff > > > > D/GSM ( 455): [DataConnection] Stop poll NetStat > > > > D/GSM ( 455): [DataConnectionTracker] setState: IDLE > > > > D/GSM ( 455): [DataConnection] Stop poll NetStat > > > > D/GSM ( 455): [DataConnectionTracker] ***trySetupData due to > > > roamingOff > > > > D/GSM ( 455): [DataConnectionTracker] trySetupData: Not ready for > > > data: dataState=IDLE gprsState=1 sim=false UMTS=false phoneState=IDLE > > > dataEnabled=true roaming=false dataOnRoamingEnable=false > > > > D/GSM ( 455): [GsmSimCard] Broadcasting intent > > > SIM_STATE_CHANGED_ACTION NOT_READY reason null > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > D/STK ( 455): StkAppService$ServiceHandler: OP_BOOT_COMPLETED > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > I/RIL ( 408): mainLoop 333 > > > > I/RIL ( 408): mainLoop open return -1. > > > > I/RIL ( 408): mainLoop 555 > > > > [ 121.580000] android_power: sleep (0->2) at 121572574640 (1970-01-01 > > > 00:02:01.572582011 UTC) > > > > My /dev info: > > > > # ls -l /dev/ttyVSP0 > > > > crw------- root root 250, 0 1970-01-01 00:00 ttyVSP0 > > > > # ls -l /system/lib/libreference-ril.so > > > > -rw-r--r-- system system 21896 2009-02-02 03:41 libreference- > > > ril.so > > > > # ls -l /system/lib/libril.so > > > > -rw-r--r-- system system 27112 2009-02-02 03:27 libril.so > > > > £š2£(c)If i chang /dev/ttyVSP0£¬Open("/dev/ttyVSP0") successful, bu > > > kernel panic. if i chmod 772, Open() OK£¬ otherwise (such as 644, 774, > > > 744) permission defiend: > > > > # /system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ > > > ttyVSP0 > > > > opening AT interface. retrying...: Permission denied > > > > # chmod 644 /dev/ttyVSP0 > > > > # /system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ > > > ttyVSP0 > > > > opening AT interface. retrying...: Permission denied > > > > # chmod 744 /dev/ttyVSP0 > > > > # /system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ > > > ttyVSP0 > > > > opening AT interface. retrying...: Permission denied > > > > # chmod 772 /dev/ttyVSP0 > > > > #/system/bin/rild -l /system/lib/libreference-ril.so -- -d /dev/ > > > ttyVSP0 > > > > [ 140.940000] > > > > [ 140.940000] MUTEX_LOCK = 0 > > > > [ 140.950000] > > > > [ 140.950000] MUTEX_LOCK = 0 > > > > [ 140.950000] > > > > [ 140.950000] MUTEX_LOCK = 0 > > > > [ 140.960000] > > > > [ 140.960000] MUTEX_LOCK = 0 > > > > [ 140.960000] vsp_tty_open: port number 0 //but mainLoop still > > > while (fd < 0) > > > > Kernel panic info: > > > > # chmod 777 /dev/ttyVSP0 > > > > [ 247.690000] > > > > [ 247.690000] MUTEX_LOCK = 0 > > > > [ 247.690000] > > > > [ 247.690000] MUTEX_LOCK = 0 > > > > [ 247.690000] > > > > [ 247.690000] MUTEX_LOCK = 0 > > > > [ 247.700000] > > > > [ 247.700000] MUTEX_LOCK = 0 > > > > [ 247.700000] vsp_tty_open: port number 0 //this is my debug > > > info in my VSP driver. > > > > [ 247.920000] Unable to handle kernel NULL pointer dereference at > > > virtual address 00000000 > > > > [ 247.920000] pgd = c0004000 > > > > [ 247.920000] [00000000] *pgd=00000000 > > > > [ 247.920000] Internal error: Oops: 817 [#1] PREEMPT > > > > [ 247.920000] Modules linked in: > > > > [ 247.920000] CPU: 0 Not tainted (2.6.25 #31) > > > > [ 247.920000] PC is at ghdi_gpdma_set_property+0x2cc/0x388 > > > > [ 247.920000] LR is at 0xc02dfc50 > > > > [ 247.920000] pc : [<c0196dbc>] lr : [<c02dfc50>] psr: 60000093 > > > > [ 247.920000] sp : c68b1f20 ip : 00000000 fp : c68b1f44 > > > > [ 247.920000] r10: 00000000 r9 : 00000001 r8 : ffc00000 > > > > [ 247.920000] r7 : c02df5d0 r6 : c68b1f68 r5 : 00000000 r4 : > > > 00000001 > > > > [ 247.920000] r3 : 00000000 r2 : 0000058f r1 : c68b0000 r0 : > > > 00000000 > > > > [ 247.920000] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM > > > Segment kernel > > > > [ 247.920000] Control: 0005317f Table: 473bc000 DAC: 00000017 > > > > [ 247.920000] Process swapper (pid: 224, stack limit = 0xc68b0268) > > > > [ 247.920000] Stack: (0xc68b1f20 to 0xc68b2000) > > > > [ 247.920000] 1f20: c0193b80 20000013 c68b1f44 00000000 c68b1f68 > > > c882ab6c c68b1fa4 c68b1f48 > > > > [ 247.920000] 1f40: c0195aa8 c0196b00 00000000 40000013 468d3000 > > > 00000000 c02df5f8 0000011a > > ... > > 阅读更多 »- 隐藏被引用文字 - > > - 显示引用的文字 - --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---