{"id":17,"date":"2007-01-13T20:27:43","date_gmt":"2007-01-14T01:27:43","guid":{"rendered":"http:\/\/www.summet.com\/blog\/2007\/01\/12\/how-to-use-a-t-mobile-cell-phone-as-a-bluetooth-modem-from-linux\/"},"modified":"2007-01-14T12:52:03","modified_gmt":"2007-01-14T17:52:03","slug":"t-mobile-bluetooth-modem","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2007\/01\/13\/t-mobile-bluetooth-modem\/","title":{"rendered":"How to use a T-Mobile cell phone as a bluetooth modem from Linux"},"content":{"rendered":"<p>Short instructions on how to use a Bluetooth enabled cell phone as a modem (allowing you to log into the Internet while mobile). A few of the commands are T-mobile specific (Look for internet3.voicestream.com), but most of the rest would apply to any service provider. With T-Mobile, you must have an activated data plan to use your phone as a modem. I am grandfathered into a plan called &quot;T-Mobile Internet VPN&quot; for 19.95 a month, but  believe the current rate is closer to $40 a month. <!--more--> <\/p>\n<ul>\n<li>First, make sure the phone and your linux box are <a href=\"http:\/\/www.summet.com\/blog\/2007\/01\/10\/pairing-devices-with-linux-bluez\/\">paired<\/a>.<\/li>\n<li>Set up your rfcomm.conf file so that rfcomm0 will automatically bind to the phone when the pppd opens it.  (You will have to use &quot;hcitool scan&quot; to find the appropriate bdaddr for your phone if you do not already know it. Be sure to set your phone to &quot;discoverable&quot; via the find me menu option first.) <code> # # RFCOMM configuration file. #  rfcomm0 {         # Automatically bind the device at startup         bind yes;          # Bluetooth address of the device         # Motorola V330         device 00:42:2C:5A:A0:26;         channel         1;  #Note that your phone will have a different Bluetooth device address, and  #some phones use a channel other than 1 for their dial up networking service. #you can use <strong>hcitool scan<\/strong> to find the phones Bluetooth address,  #and then <strong>sdptool search DUN<\/strong> to determine which RFCOMM  #channel to use.          # Description of the connection         comment &quot;Jay&#39;s Phone&quot;; } <\/code><\/li>\n<li>Configure your pppd to open rfcomm0 and have the appropriate settings using a peers file (I call mine <strong>gprs<\/strong>.) located by default in \/etc\/ppp\/peers. My example: <code> debug noauth connect &#39;\/usr\/sbin\/chat -v -f \/etc\/ppp\/chat-tmobile-gprs&#39; \/dev\/rfcomm0 115200 defaultroute usepeerdns #Other possibly useful settings depending upon your phone. #crtscts #kdebug 1 #ktune #lcp-echo-failure 0 #lcp-echo-interval 65535 #mtu 576 <\/code><\/li>\n<li>The chat-tmobile-gprs script sends the appropriate commands to the modem. <code> TIMEOUT                15 ECHO                            ON ABORT                           &#39;\\nBUSY\\r&#39; ABORT                           &#39;\\nERROR\\r&#39; ABORT                           &#39;\\nNO ANSWER\\r&#39; ABORT                           &#39;\\nNO CARRIER\\r&#39; ABORT                           &#39;\\nNO DIALTONE\\r&#39; &#39;&#39;                                      \\rATZ # The following line was  apparently unneeded for the V330 phone. However, it # WAS needed for the Nokia 9500 communicator phone (otherwise we got an # LCP terminated by host error message): OK      AT+CGDCONT=1,&quot;IP&quot;,&quot;internet3.voicestream.com&quot;,,0,0 OK                                      ATD*99# CONNECT                 &quot;&quot; <\/code><\/li>\n<li>Make sure that your bluetooth subsystem is running:<strong>service bluetooth status<\/strong> and if needed, <strong>service bluetooth start<\/strong><\/li>\n<li>Initate the call with the following command: <strong>pppd call gprs<\/strong><\/li>\n<li>It may be useful to have a second terminal open showing messages from the pppd, <strong>tail -f \/var\/log\/messages<\/strong> for debugging purposes. If everything works, it should look something like this: <code> kernel: CSLIP: code copyright 1989 Regents of the University of California kernel: PPP generic driver version 2.4.2 pppd[4664]: pppd 2.4.3 started by root, uid 0 hcid[2533]: link_key_request (sba=00:03:A4:3A:72:D1, dba=00:0A:A4:C7:3A:B7) chat[4665]: timeout set to 15 seconds chat[4665]: abort on (\\nBUSY\\r) chat[4665]: abort on (\\nERROR\\r) chat[4665]: abort on (\\nNO ANSWER\\r) chat[4665]: abort on (\\nNO CARRIER\\r) chat[4665]: abort on (\\nNO DIALTONE\\r) chat[4665]: send (^MATZ^M) chat[4665]: expect (OK) chat[4665]: ^MATZ^M^M chat[4665]: OK chat[4665]:  -- got it  chat[4665]: send (AT+CGDCONT=1,&quot;IP&quot;,&quot;internet3.voicestream.com&quot;,,0,0^M) chat[4665]: expect (OK) chat[4665]: ^M chat[4665]: AT+CGDCONT=1,&quot;IP&quot;,&quot;internet3.voicestream.com&quot;,,0,0^M^M chat[4665]: OK chat[4665]:  -- got it  chat[4665]: send (ATD*99#^M) chat[4665]: expect (CONNECT) chat[4665]:  -- got it  chat[4665]: send (^M) pppd[4664]: Serial connection established. pppd[4664]: Using interface ppp0 pppd[4664]: Connect: ppp0 &lt; --&gt; \/dev\/rfcomm0 kernel: PPP MPPE Compression module registered kernel: PPP BSD Compression module registered kernel: PPP Deflate Compression module registered pppd[4664]: local  IP address 72.250.95.250 pppd[4664]: remote IP address 10.6.6.6 pppd[4664]: primary   DNS address 66.94.25.120 pppd[4664]: secondary DNS address 66.94.9.120 <\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Short instructions on how to use a Bluetooth enabled cell phone as a modem (allowing you to log into the Internet while mobile). A few of the commands are T-mobile specific (Look for internet3.voicestream.com), but most of the rest would &hellip; <a href=\"https:\/\/www.summet.com\/blog\/2007\/01\/13\/t-mobile-bluetooth-modem\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,7,2],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-bluetooth","category-linux","category-phones","category-technology"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}