Difference between revisions of "GPRS Data"
(Created page with "= How to Enable GPRS Data on IPLOG-GAMA G2/G3 = == IPLOG-GAMA-G2 ==") |
|||
Line 1: | Line 1: | ||
+ | <font color="red" size="+1">This page is beign temporarily revised with the newest updates.</font> | ||
+ | |||
= How to Enable GPRS Data on IPLOG-GAMA G2/G3 = | = How to Enable GPRS Data on IPLOG-GAMA G2/G3 = | ||
− | == IPLOG-GAMA-G2 == | + | == IPLOG-GAMA G2 == |
+ | The property '''GPRS data''' is disabled from the default configuration. However, the system has everything what you need to successfully establish a PPP connection. | ||
+ | This allows the IPLOG-GAMA G2 unit access to the mobile Internet. | ||
+ | |||
+ | |||
+ | Open the file '''/etc/init.d/S41gprs''' by default text editor '''Vi'''. | ||
+ | |||
+ | {{NotePre | ||
+ | |text=root@iplog:~# vi /etc/init.d/S41gprs | ||
+ | }} | ||
+ | |||
+ | |||
+ | The file contains two commented lines 45 and 52 (#pon and #poff), delete the comment charakter '''#''' before. | ||
+ | |||
+ | The resulting file should look like this:<syntaxhighlight lang="shell" line="1"> | ||
+ | #!/bin/sh | ||
+ | # | ||
+ | # Starts the GPRS | ||
+ | # | ||
+ | |||
+ | NAME=gprs | ||
+ | CONN=vodafone | ||
+ | PRODUCT=`metel-eeprom -c read product` | ||
+ | PCB_ASS=`metel-eeprom -c read assembly-pcb` | ||
+ | |||
+ | PRODUCT=${PRODUCT##* } | ||
+ | PCB_ASS=${PCB_ASS##* } | ||
+ | |||
+ | join() | ||
+ | { | ||
+ | # $1 - file | ||
+ | # $2 - wait for $2 seconds | ||
+ | |||
+ | for i in $(seq 1 $2) | ||
+ | do | ||
+ | if [ -e $1 ] | ||
+ | then | ||
+ | # Telit found | ||
+ | return 0 | ||
+ | else | ||
+ | # Wait: 1s | ||
+ | sleep 1 | ||
+ | fi | ||
+ | done | ||
+ | |||
+ | return 1 | ||
+ | } | ||
+ | |||
+ | start() | ||
+ | { | ||
+ | printf "Starting $NAME: " | ||
+ | # For IPLOG_GAMA_G2_10052018 and newer wait for supply power ON and Teli | ||
+ | if [ $PRODUCT == 0x494702 ]; then | ||
+ | if [ ${PCB_ASS%%_*} != 27042017 ] && [ ${PCB_ASS%%_*} != 18092017 ]; t | ||
+ | join "/dev/ttyACM0" 15 | ||
+ | # wait 5s for catch GSM signal | ||
+ | sleep 5 | ||
+ | fi | ||
+ | fi | ||
+ | pon gprs | ||
+ | [ $? = 0 ] && echo "OK" || echo "FAIL" | ||
+ | } | ||
+ | |||
+ | stop() | ||
+ | { | ||
+ | printf "Stopping $NAME: " | ||
+ | poff | ||
+ | [ $? = 0 ] && echo "OK" || echo "FAIL" | ||
+ | } | ||
+ | |||
+ | case "$1" in | ||
+ | start) | ||
+ | start | ||
+ | ;; | ||
+ | stop) | ||
+ | stop | ||
+ | ;; | ||
+ | restart|reload) | ||
+ | stop | ||
+ | start | ||
+ | ;; | ||
+ | *) | ||
+ | echo "Usage: $0 {start|stop|restart}" | ||
+ | exit 1 | ||
+ | esac | ||
+ | |||
+ | exit $? | ||
+ | |||
+ | #end-of-file | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | {{Tip|TipText= <br/> | ||
+ | '''Text editing''' - Hit the '''i''' (insert mode).<br/> | ||
+ | '''Save and Exit''' - Write charakter ''':wq''' (write and quit). The cursor moves to bottom of screen whenever a colon (:) is typed. This type of command is completed by hitting the '''Enter''' key. }} | ||
+ | |||
+ | It is strongly recommended to do a reboot. | ||
+ | {{NotePre | ||
+ | |text=root@buildroot:~# reboot | ||
+ | }} |
Revision as of 12:53, 10 June 2019
This page is beign temporarily revised with the newest updates.
How to Enable GPRS Data on IPLOG-GAMA G2/G3
IPLOG-GAMA G2
The property GPRS data is disabled from the default configuration. However, the system has everything what you need to successfully establish a PPP connection. This allows the IPLOG-GAMA G2 unit access to the mobile Internet.
Open the file /etc/init.d/S41gprs by default text editor Vi.
root@iplog:~# vi /etc/init.d/S41gprs
The file contains two commented lines 45 and 52 (#pon and #poff), delete the comment charakter # before.
#!/bin/sh
#
# Starts the GPRS
#
NAME=gprs
CONN=vodafone
PRODUCT=`metel-eeprom -c read product`
PCB_ASS=`metel-eeprom -c read assembly-pcb`
PRODUCT=${PRODUCT##* }
PCB_ASS=${PCB_ASS##* }
join()
{
# $1 - file
# $2 - wait for $2 seconds
for i in $(seq 1 $2)
do
if [ -e $1 ]
then
# Telit found
return 0
else
# Wait: 1s
sleep 1
fi
done
return 1
}
start()
{
printf "Starting $NAME: "
# For IPLOG_GAMA_G2_10052018 and newer wait for supply power ON and Teli
if [ $PRODUCT == 0x494702 ]; then
if [ ${PCB_ASS%%_*} != 27042017 ] && [ ${PCB_ASS%%_*} != 18092017 ]; t
join "/dev/ttyACM0" 15
# wait 5s for catch GSM signal
sleep 5
fi
fi
pon gprs
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
stop()
{
printf "Stopping $NAME: "
poff
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
#end-of-file
Tip:
Text editing - Hit the i (insert mode).
Save and Exit - Write charakter :wq (write and quit). The cursor moves to bottom of screen whenever a colon (:) is typed. This type of command is completed by hitting the Enter key.
It is strongly recommended to do a reboot.
root@buildroot:~# reboot