It is just a device nod. App can open this nod and write data to it or read data from it when app will transfer data to hardware or read data from hardware.
On 3月28日, 上午2时16分, Yongren <[email protected]> wrote: > Would somebody please tell me what "/dev/omap_csmi_tty1" is? > > According to reference-ril.c for RIL_REQUEST_SETUP_DEFAULT_PDP, it > seems "/dev/omap_csmi_tty1" is passed as follows via > RIL_onRequestComplete() after complete the necessary procedure for PDP > Context activation. > > #define PPP_TTY_PATH "/dev/omap_csmi_tty1" > ................. abbr ................. > static void requestSetupDefaultPDP(void *data, size_t datalen, > RIL_Token t) > { > const char *apn; > char *cmd; > int err; > ATResponse *p_response = NULL; > char *response[2] = { "1", PPP_TTY_PATH }; > ................. abbr ................. > RIL_onRequestComplete(t, RIL_E_SUCCESS, response, sizeof > (response)); > > And according to PdpConnection.java, it seems above "response" is > handled as follows. > > public void handleMessage(Message msg) { > AsyncResult ar; > switch (msg.what) { > case EVENT_SETUP_PDP_DONE: > ................. abbr ................. > } else { > String[] response = ((String[]) ar.result); > cid = Integer.parseInt(response[0]); > if (response.length > 2) { > interfaceName = response[1]; > ipAddress = response[2]; > String prefix = "net." + interfaceName + > "."; > gatewayAddress = SystemProperties.get > (prefix + "gw"); > dnsServers[0] = SystemProperties.get > (prefix + "dns1"); > dnsServers[1] = SystemProperties.get > (prefix + "dns2"); > if (DBG) { > log("interface=" + interfaceName + " > ipAddress=" + ipAddress > + " gateway=" + gatewayAddress + " > DNS1=" + dnsServers[0] > + " DNS2=" + dnsServers[1]); > } --~--~---------~--~----~------------~-------~--~----~ unsubscribe: [email protected] website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---
