LTE Data

From IPLOG
Revision as of 12:19, 12 June 2019 by Z013 (talk | contribs)
Jump to: navigation, search

This page is beign temporarily revised with the newest updates.

How to Set Up GPRS Data on IPLOG-GAMA G3

By default, the use of LTE mobile data for IPLOG-GAMA G3 is enabled. In the most cases, therefore, it is not necessary to change default configuration.


Check the Mobile Connection

Type command:

root@iplog:~# ifconfig wwan0

If mobile connection is active you will see similar output:

wwan0     Link encap:Ethernet  HWaddr AE:C9:12:92:2C:81
          inet addr:100.106.91.142  Bcast:100.106.91.255  Mask:255.255.255.0
          UP BROADCAST RUNNING NOARP MULTICAST  MTU:1428  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:56 (56.0 B)

Note: It's important that a line with an assigned IP address is present in the output. (Example: inet addr:100.106.91.142  Bcast:100.106.91.255  Mask:255.255.255.0


In the case any error, for example:

ifconfig: wwan0: error fetching interface information: Device not found

</syntaxhighlight>please follow the next chapters of this page (APN access point setting, PIN setting)



Enable/Disable LTE Mobile Data Connection

Disable LTE Connection

To disable the automatic mobile data connection after boot, perform the following sequence of commands as root user.

1. Backup

It is recommended backup start up script S41lte before remove to posibility enable it again.

root@iplog:~# cp /etc/init.d/S41lte /etc/init.d/K41lte

2. Disable

Deleting file S41lte will disable automatic connection.

root@iplog:~# rm /etc/init.d/S41lte



Manual Connection/Disconnection of LTE Mobile Data. ==

Connecting

root@iplog:~# /etc/init.d/S41lte start


Disconnecting

root@iplog:~# cp /etc/init.d/S41lte stop



APN access point setting

Most mobile operators use for LTE access point called internet. This is the default setting and nothing needs to be changed if your mobile operator uses the same APN. In other countries, GSM network settings may be different. Therefore, we are introducing a simple way to change the APN.

1) Open the /etc/mbim-network.conf file in the text editor VIM
root@iplog:~# vi /etc/mbim-network.conf
2) The APN to use should be configured in this file, in the following way (e.g. assuming APN is called 'internet'):
APN=internet
 Optional APN user/password strings may be given in the following way:
APN_USER=user
APN_PASS=password
If APN user/password is specified, the authentication protocol to use (one of PAP, CHAP or MSCHAPV2) must also be specified in the following way:
APN_AUTH=protocol
Note: another important line for proper operation is as follows:
PROXY=yes
Note: Press the 'i' key in the VIM editor to editing text.

Note: To save the file in the VIM editor, press the Esc key and type ":x" (without the quotation marks) and then press Enter.

3) Do reboot
root@iplog:~# reboot



Automatic after boot

Enable

You need to have the startup script /etc/init.d/S41lte in the file system. This file is factory-created. If it is not, make sure that the /etc/init.d/K41lte file exists. If so, simply rename the file to /etc/init.d/S41lte. That is all. Otherwise, if none of the above files exists, you must manually create it.

1) Create the file as root
root@iplog:~# touch /etc/init.d/S41lte
2) Change access rights
root@iplog:~# chmod 755 /etc/init.d/S41lte
3) Open the /etc/init.d/S41gprs file in the text editor VIM
root@iplog:~# vi /etc/init.d/S41lte
Press the 'i' key to insert and paste the following content:
#!/bin/sh
#
# Starts the LTE
#

NAME=lte
PREFIX=/usr/bin
START_DAEMON=${PREFIX}/${NAME}_always_on
STOP_SCRIPT=${PREFIX}/${NAME}_off
PIDFILE=/var/run/${NAME}.pid

start()
{
        printf "Starting $NAME: "
        start-stop-daemon -S --background -p $PIDFILE --make-pidfile --startas ${START_DAEMON} && echo "OK" || echo
}

stop()
{
        printf "Stopping $NAME: "
        start-stop-daemon -K -q -p $PIDFILE && \
        rm -f $PIDFILE && \
        $STOP_SCRIPT > /dev/null && \
        echo "OK" || echo "Failed"
}

case "$1" in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart|reload)
                stop
                start
                ;;
        *)
                echo "Usage: $0 {start|stop|restart}"
                exit 1
esac

exit $?

#end-of-file
Note: To save the file in the VIM editor, press the Esc key and type ":x" (without the quotation marks) and then press Enter.


PIN setting

If your SIM card is protected by a PIN code, you need to enter the correct PIN code into the SMS daemon configuration.

1) Open the /etc/smsd.conf file in the text editor VIM
root@iplog:~# vi /etc/smsd.conf
2) Make sure there is a uncommented (without '#' at the beginning) line in the file:
pin = XXXX
where XXXX is your correct PIN. For example for PIN 1234:
devices = TELIT-UL865
logfile = /var/log/smsd.log
loglevel = 3

[TELIT-UL865]
device = /dev/ttyACM3
check_sim = yes
check_sim_retries = forever
# Some mobile operators (like Czech O2) during the logging to network several times reject the SIM.
# This causes an unexpected end of the daemon. This is why the network check is disabled.
check_network = no
incoming = yes
pin = 1234
Note: Press the 'i' key in the VIM editor to editing text.

Note: To save the file in the VIM editor, press the Esc key and type ":x" (without the quotation marks) and then press Enter.

3) Changes will be applied at the next start of the IPLOG or by running the command:
root@iplog:~# /etc/init.d/S41lte restart