{"id":322,"date":"2011-12-25T22:21:32","date_gmt":"2011-12-25T21:21:32","guid":{"rendered":"http:\/\/diablo.craem.net\/wordpress\/?p=322"},"modified":"2011-12-25T22:21:32","modified_gmt":"2011-12-25T21:21:32","slug":"configurar-android-2-3-x-como-modem-para-ubuntu-debian","status":"publish","type":"post","link":"https:\/\/diablo.craem.net\/?p=322","title":{"rendered":"configurar Android 2.3.x como modem para ubuntu \/ debian"},"content":{"rendered":"<p>Tras actualizar mi Samsung Galaxy GT-9003 a la \u00faltima versi\u00f3n disponible (2.3.5), he visto que he perdido algunas funcionalidades&#8230;&#8230; al conectarlo a mis port\u00e1tiles con linux (varios), por USB, no lo puedo volver a usar como modem&#8230; \ud83d\ude41  usarlo como AP wifi no me gusta, consume mucha bater\u00ed\u00ada.<br \/>\nVamos a comprobar&#8230;. ponemos el tel\u00e9fono en modo depuraci\u00f3n y lo conectamos a nuestro ubuntu&#8230;.. hacemos un <em>sudo dmesg<\/em> y vemos algo positivo&#8230; \ud83d\ude42<br \/>\n<code><br \/>\n[21488.727062] cdc_acm 1-1:1.1: This device cannot do calls on its own. It is not a modem.<br \/>\n[21488.727173] cdc_acm 1-1:1.1: ttyACM0: USB ACM device<br \/>\n[21488.728567] usbcore: registered new interface driver cdc_acm<br \/>\n[21488.728569] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters<br \/>\n[21489.662890] scsi 4:0:0:0: Direct-Access     Texas In struments Inc.OM AP4  PQ: 0 ANSI: 2<br \/>\n[21489.664629] scsi 4:0:0:1: Direct-Access     Texas In struments Inc.OM AP4  PQ: 0 ANSI: 2<br \/>\n[21489.666325] sd 4:0:0:0: Attached scsi generic sg3 type 0<br \/>\n[21489.666825] sd 4:0:0:1: Attached scsi generic sg4 type 0<br \/>\n[21489.680981] sd 4:0:0:0: [sdc] Attached SCSI removable disk<br \/>\n[21489.683482] sd 4:0:0:1: [sdd] Attached SCSI removable disk<br \/>\n<\/code><br \/>\nVemos que se crea un nuevo modem USB \ud83d\ude42 en el puerto <strong>ttyACM0: USB ACM device<\/strong>&#8230;. y ahora vamos a investigar c\u00f3mo&#8230;.<br \/>\nLo primero que se me ocurre es usar el viejo wvdial&#8230;<br \/>\n<code><br \/>\nsudo apt-get install wvdial<br \/>\n<\/code><br \/>\nTras unos instantes tendremos instalados los paquetes&#8230; ahora hacemos la config&#8230;<br \/>\n<code><br \/>\nsudo wvdialconf<br \/>\n<\/code><br \/>\nY ahora vemos la config&#8230; en mi caso tengo Joigo; el modem en el puerto ACM0. Editamos el fichero <strong>\/etc\/wvdial.conf<\/strong> y deber\u00e1 estar m\u00e1s o menos como este:<br \/>\n<code><br \/>\n[Dialer Defaults]<br \/>\nInit1 = ATZ<br \/>\nInit2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0<br \/>\nInit3 = AT+CGDCONT=1,\"IP\",\"internet\"<br \/>\nModem = \/dev\/ttyACM0<br \/>\nPhone = *99***1#<br \/>\nIdle Seconds = 3000<br \/>\nAuto DNS = 1<br \/>\nPassword = internet<br \/>\nModem Type = USB Modem<br \/>\nStupid Mode = 1<br \/>\nCompuserve = 0<br \/>\nBaud = 460800<br \/>\nNew PPPD = yes<br \/>\nDial Command = ATDT<br \/>\nAsk Password = 0<br \/>\nISDN = 0<br \/>\nUsername = internet<br \/>\n<\/code><br \/>\nYa tenemos listo el marcado y el modem&#8230; ahora para usarlo&#8230; desde el terminal, hacemos:<br \/>\n<code><br \/>\nsudo wvdial<br \/>\n<\/code><br \/>\ny tendremos que ver en la consola, algo como esto:<br \/>\n<code><br \/>\ncraem@cepheusMAC:\/etc$ sudo wvdial<br \/>\n--> WvDial: Internet dialer version 1.60<br \/>\n--> Cannot get information for serial port.<br \/>\n--> Initializing modem.<br \/>\n--> Sending: ATZ<br \/>\nOK<br \/>\n--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0<br \/>\nOK<br \/>\n--> Sending: AT+CGDCONT=1,\"IP\",\"internet\"<br \/>\nAT+CGDCONT=1,\"IP\",\"internet\"<br \/>\nOK<br \/>\n--> Modem initialized.<br \/>\n--> Idle Seconds = 3000, disabling automatic reconnect.<br \/>\n--> Sending: ATDT*99***1#<br \/>\n--> Waiting for carrier.<br \/>\nATDT*99***1#<br \/>\nCONNECT 7200000<br \/>\n--> Carrier detected.  Starting PPP immediately.<br \/>\n--> Starting pppd at Sun Dec 25 22:14:11 2011<br \/>\n--> Pid of pppd: 7023<br \/>\n--> pppd: [14][7f]<br \/>\n--> Using interface ppp0<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> Authentication (CHAP) started<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> Authentication (CHAP) successful<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> local  IP address 46.XXX.XX.XXX<br \/>\n--> pppd: [14][7f]<br \/>\n--> remote IP address 46.XXX.XX.XXX<br \/>\n--> pppd: [14][7f]<br \/>\n--> primary   DNS address 213.248.76.210<br \/>\n--> pppd: [14][7f]<br \/>\n--> secondary DNS address 213.248.100.54<br \/>\n--> pppd: [14][7f]<br \/>\n--> pppd: [14][7f]<br \/>\n--> Script \/etc\/ppp\/ip-up run successful<br \/>\n--> Default route Ok.<br \/>\n<\/code><br \/>\nY voil\u00e1!!!! ya tenemos conexi\u00f3n a internet&#8230; nuestro flamante tel\u00e9fono android 2.3.x + linux ubuntu \/ debian \ud83d\ude42 problema solucionado.<br \/>\nAhora podemos ver si hay IP; hacemos un ifconfig y vemos el interface ppp<br \/>\n<code><br \/>\nppp0      Link encap:Protocolo punto a punto<br \/>\n          Direc. inet:46.XXX.XX.XXX  P-t-P:46.XXX.XX.XXX  M\u00e1sc:255.255.255.255<br \/>\n          ACTIVO PUNTO A PUNTO FUNCIONANDO NOARP MULTICAST  MTU:1500  M\u00e9trica:1<br \/>\n          Paquetes RX:20 errores:0 perdidos:0 overruns:0 frame:0<br \/>\n          Paquetes TX:10 errores:0 perdidos:0 overruns:0 carrier:0<br \/>\n          colisiones:0 long.colaTX:3<br \/>\n          Bytes RX:582 (582.0 B)  TX bytes:219 (219.0 B)<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tras actualizar mi Samsung Galaxy GT-9003 a la \u00faltima versi\u00f3n disponible (2.3.5), he visto que he perdido algunas funcionalidades&#8230;&#8230; al conectarlo a mis port\u00e1tiles con linux (varios), por USB, no lo puedo volver a usar como modem&#8230; \ud83d\ude41 usarlo como AP wifi no me gusta, consume mucha bater\u00ed\u00ada. Vamos a comprobar&#8230;. ponemos el tel\u00e9fono en [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[20,58,102,108,186],"class_list":["post-322","post","type-post","status-publish","format-standard","hentry","category-linux","tag-android","tag-debian","tag-linux-2","tag-modem-3g","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/diablo.craem.net\/index.php?rest_route=\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/diablo.craem.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diablo.craem.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diablo.craem.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/diablo.craem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322"}],"version-history":[{"count":0,"href":"https:\/\/diablo.craem.net\/index.php?rest_route=\/wp\/v2\/posts\/322\/revisions"}],"wp:attachment":[{"href":"https:\/\/diablo.craem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diablo.craem.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diablo.craem.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}