hardware/ril
Revision | 87e1dfeeaa75dc7671c89c8787646e7df1afdf35 (tree) |
---|---|
Zeit | 2010-09-13 19:12:50 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Support 3G modem card on x86
Change-Id: I47b7dd5e1610a285a1a413dee1843018f097d9a0
@@ -36,11 +36,12 @@ | ||
36 | 36 | |
37 | 37 | #define LOG_TAG "RIL" |
38 | 38 | #include <utils/Log.h> |
39 | +#include <cutils/properties.h> | |
39 | 40 | |
40 | 41 | #define MAX_AT_RESPONSE 0x1000 |
41 | 42 | |
42 | 43 | /* pathname returned from RIL_REQUEST_SETUP_DATA_CALL / RIL_REQUEST_SETUP_DEFAULT_PDP */ |
43 | -#define PPP_TTY_PATH "/dev/omap_csmi_tty1" | |
44 | +#define PPP_TTY_PATH "/dev/ppp0" | |
44 | 45 | |
45 | 46 | #ifdef USE_TI_COMMANDS |
46 | 47 |
@@ -241,7 +242,8 @@ static void onSIMReady() | ||
241 | 242 | * ds = 1 // Status reports routed to TE |
242 | 243 | * bfr = 1 // flush buffer |
243 | 244 | */ |
244 | - at_send_command("AT+CNMI=1,2,2,1,1", NULL); | |
245 | + LOGI ("######### SIM READY !!\n"); | |
246 | + at_send_command("AT+CNMI=1,2,2,1,0", NULL); | |
245 | 247 | } |
246 | 248 | |
247 | 249 | static void requestRadioPower(void *data, size_t datalen, RIL_Token t) |
@@ -1033,8 +1035,8 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t) | ||
1033 | 1035 | |
1034 | 1036 | if (qmistatus < 0) goto error; |
1035 | 1037 | |
1036 | - } else { | |
1037 | - | |
1038 | + } else { | |
1039 | +#if 0 | |
1038 | 1040 | asprintf(&cmd, "AT+CGDCONT=1,\"IP\",\"%s\",,0,0", apn); |
1039 | 1041 | //FIXME check for error here |
1040 | 1042 | err = at_send_command(cmd, NULL); |
@@ -1058,6 +1060,7 @@ static void requestSetupDataCall(void *data, size_t datalen, RIL_Token t) | ||
1058 | 1060 | if (err < 0 || p_response->success == 0) { |
1059 | 1061 | goto error; |
1060 | 1062 | } |
1063 | +#endif | |
1061 | 1064 | } |
1062 | 1065 | |
1063 | 1066 | RIL_onRequestComplete(t, RIL_E_SUCCESS, response, sizeof(response)); |
@@ -1838,9 +1841,6 @@ static void initializeCallback(void *param) | ||
1838 | 1841 | /* Alternating voice/data off */ |
1839 | 1842 | at_send_command("AT+CMOD=0", NULL); |
1840 | 1843 | |
1841 | - /* Not muted */ | |
1842 | - at_send_command("AT+CMUT=0", NULL); | |
1843 | - | |
1844 | 1844 | /* +CSSU unsolicited supp service notifications */ |
1845 | 1845 | at_send_command("AT+CSSN=0,1", NULL); |
1846 | 1846 |
@@ -2033,7 +2033,7 @@ mainLoop(void *param) | ||
2033 | 2033 | SOCK_STREAM ); |
2034 | 2034 | } else if (s_device_path != NULL) { |
2035 | 2035 | fd = open (s_device_path, O_RDWR); |
2036 | - if ( fd >= 0 && !memcmp( s_device_path, "/dev/ttyS", 9 ) ) { | |
2036 | + if (fd >= 0) { | |
2037 | 2037 | /* disable echo on serial ports */ |
2038 | 2038 | struct termios ios; |
2039 | 2039 | tcgetattr( fd, &ios ); |
@@ -132,7 +132,7 @@ int main(int argc, char **argv) | ||
132 | 132 | } |
133 | 133 | |
134 | 134 | /* special override when in the emulator */ |
135 | -#if 1 | |
135 | +#if 0 | |
136 | 136 | { |
137 | 137 | static char* arg_overrides[3]; |
138 | 138 | static char arg_device[32]; |