{"id":14508,"date":"2016-08-09T15:46:28","date_gmt":"2016-08-09T20:46:28","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=14508"},"modified":"2021-09-02T15:48:25","modified_gmt":"2021-09-02T20:48:25","slug":"mlinux-cellular-connection","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/mlinux-cellular-connection\/","title":{"rendered":"Cellular Connection"},"content":{"rendered":"<p>To establish a cellular data link, you must configure and initiate a PPP connection. Sample options files and chat scripts are provided in the ppp peers directory <code>\/etc\/ppp\/peers<\/code>. Anything specific to the network or connection should be placed in one of these files. Global options should be placed in <code>\/etc\/ppp\/options<\/code>.<\/p>\n<p>To run the pppd command, the user must either have root privilege, or be a member of the dialout group. Use\u00a0\u00a0the default administrator, mtadm, since it&#8217;s already a member of the dialout group.<\/p>\n<div class=\"note\">See the man pages on your development system for additional <strong>chat<\/strong> and <strong>pppd<\/strong> information.<br \/>\n<strong><\/strong><br \/>\n<strong><\/strong><\/div>\n<div class=\"note\"><strong>NOTE:<\/strong> When attempting to verify or set the APN, in the chat script, make sure <strong>cfun<\/strong> does NOT equal 0 and <strong>cops<\/strong> does NOT equal 2.<\/div>\n<h3><strong><\/strong>Set Up Cellular Data <strong>Connection<br \/>\n<\/strong><\/h3>\n<h4>For MTCDT-H5, MTCDT-LAT1, MTCDT-LEU1, MTCDT-LAP3, MTCDT-L4E1, and MTCDT-L4G1 (non-Verizon SIMs)<\/h4>\n<pre class=\"brush:shell\"># Set \"APN\" to the APN for your cellular provider \r\n$ mlinux-set-apn APN\r\n# Dial the connection (using \/etc\/ppp\/peers\/gsm config)\r\n$ pppd call gsm<\/pre>\n<h4>For MTCDT-LVW2,\u00a0<b>MTCDT-L4G1 (Verizon SIM)<\/b><\/h4>\n<pre class=\"brush:shell\"># Dial the connection (using \/etc\/ppp\/peers\/lvw2 config)\r\n$ pppd call lvw2<\/pre>\n<h4>For\u00a0 MTCAP-LSP3 (or other Sprint LTE devices)<\/h4>\n<pre class=\"brush:shell\"># Before establishing PPP connection, modify the file, \/etc\/ppp\/options\r\nsudo -s\r\necho -e '+ipv6\\nipv6cp-use-ipaddr' &gt;&gt;\/etc\/ppp\/options<\/pre>\n<pre class=\"brush:shell\"># Dial the connection (using \/etc\/ppp\/peers\/lsp3 config)\r\n$ pppd call lsp3<\/pre>\n<p>See information on <a href=\"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/mlinux-cellular-connection\/lsp-device-sprint-lte-activation\/\">LSP device (Sprint LTE) activation.<\/a><\/p>\n<p><span style=\"font-size: small;\"><strong>Chat Scripts for Modems with a firmware switch capability (includes -LNA3 and -L4N1)\u00a0\u00a0<\/strong><\/span><\/p>\n<p><strong>NOTE:<\/strong> The\u00a0example shown is for an MTCAP-LNA3.\u00a0 For other models, simply replace instances of lna3 with your applicable model like l4n1.<\/p>\n<p>There are two chat scripts, <i>\/etc\/ppp\/peers\/lna3_chat_non_vz<\/i> and <i>\/etc\/ppp\/peers\/lna3_chat_vz<\/i>. These are selected by a link, <i>\/etc\/ppp\/peers\/lna3_chat<\/i>.<\/p>\n<p>The Verizon script should never be edited. The non-vzw script should be edited if the AT&amp;T APN changes, or if the IP type <i>IP<\/i> changes, or the SIM is not AT&amp;T.<\/p>\n<p>The APN can be changed with the script mlinux-set-apn if needed (not required for Multitech provided SIM):<\/p>\n<pre class=\"brush:shell\">$ mlinux-set-apn \"phone\"<\/pre>\n<p>To switch the firmware and APN together to the current SIM:<\/p>\n<pre class=\"brush:shell\">$ mlinux-switch-apn\r\nCellular radio is ready.\r\nCellular radio is ready.\r\nSetting chat script to \/etc\/ppp\/peers\/lna3_chat_non_vz<\/pre>\n<p>If the system is rebooted it will switch the firmware and chat to the current SIM. If ppp is set up to start on boot, it will be necessary to reboot twice. The first time switches the firmware, and the 2nd boot connects using PPP. The firmware switch follows the PPP connection, so as not to disrupt the normal case. If PPP is configured, and the firmware and chat are not correct, by default PPP will wait for 60 seconds for the modem.<\/p>\n<p>If one wishes to switch the firmware and chat without a SIM:<\/p>\n<p>Switch the firmware and chat to Verizon (order dependent):<\/p>\n<pre class=\"brush:shell\">$ mlinux-switch-cell-fw 1\r\n$ mlinux-switch-apn 1<\/pre>\n<p>If the value provided is 0 instead of 1,\u00a0 the firmware and APN switches to AT&amp;T (or non-Verizon if using another carrier).\u00a0 A new device has the value of 0.<\/p>\n<p>Again, the dialing instructions for -LNA3\u00a0are similar to the other products:<\/p>\n<pre class=\"brush:shell\"># Dial the connection (using \/etc\/ppp\/peers\/lna3 config)\r\n$ pppd call lna3<\/pre>\n<h3>Verify ppp0 is up<\/h3>\n<p>The <code>route<\/code> Linux utility can be used to verify the <code>ppp0<\/code> interface is now the default route:<\/p>\n<pre class=\"brush:shell\">$ route\r\nKernel IP routing table\r\nDestination     Gateway         Genmask         Flags Metric Ref    Use Iface\r\ndefault         33.140.12.18    0.0.0.0         UG    0      0        0 ppp0\r\n33.140.12.18    *               255.255.255.255 UH    0      0        0 ppp0\r\n192.168.2.0     *               255.255.255.0   U     0      0        0 eth0<\/pre>\n<p>The <code>ifconfig<\/code> Linux utility can be used to inspect the <code>ppp0<\/code> interface details.<\/p>\n<pre class=\"brush:shell\">$ ifconfig ppp0\r\nppp0      Link encap:Point-to-Point Protocol  \r\n          inet addr:33.140.12.18  P-t-P:33.140.12.18  Mask:255.255.255.255\r\n          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1\r\n          RX packets:7 errors:0 dropped:0 overruns:0 frame:0\r\n          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0\r\n          collisions:0 txqueuelen:3 \r\n          RX bytes:106 (106.0 B)  TX bytes:145 (145.0 B)<\/pre>\n<p>Additionally, you can view the <code>pppd<\/code> logs in <code>\/var\/log\/messages<\/code> to see the modem dialing and assigned IP address or errors if the connection was unsuccessful.<\/p>\n<h3>Stop a PPP Connection<\/h3>\n<pre class=\"brush:shell\"># send SIGTERM to pppd, which causes it to hang up and exit cleanly     \r\n$ killall pppd<\/pre>\n<h3>More Information<\/h3>\n<ul>\n<li><a href='https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/start-cell-connection-on-boot\/' title='Start Cell Connection on Boot'>Start Cell Connection on Boot<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To establish a cellular data link, you must configure and initiate a PPP connection. Sample options files and chat scripts are provided in the ppp peers directory \/etc\/ppp\/peers. Anything specific to the network or connection should be placed in one of these files. Global options should be placed in \/etc\/ppp\/options. To run the pppd command, [&hellip;]<\/p>\n","protected":false},"author":1235,"featured_media":0,"parent":9184,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-14508","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/14508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1235"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=14508"}],"version-history":[{"count":64,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/14508\/revisions"}],"predecessor-version":[{"id":14513,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/14508\/revisions\/14513"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9184"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=14508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}