You are here

How to Guide: ELS61/PLS62 and Linux Startup

Tutorial, September 14, 2017 - 4:10pm, 1794 views

Attached is the startup guide for communicating to the ELS61 from Linux and activating and running a basic internet connection from the module. Related documents available on request.

 ELS61 Connection guide.pdf

**EDIT** These instructions apply to the PLS62 as well

Alopez's picture
Alopez

Hi,

wonderfull!!

Regards

ALopez

Somewhere over the rainbow!!! Looking for the Oz Land!!!

ASHVARTS's picture
ASHVARTS

Here is a bash script to automate the process:

(remove backslash before square brackets)

#!/bin/bash
ATinterface="/dev/ttyACM0"
APN="uinternet"

exec <> $ATinterface

function send_command {
	ret=""
	echo -e "AT cmd:$1"
	echo -e "$1" > $ATinterface
	while read line < $ATinterface; do
		if \[\[ ${#line} != 1 \]\] ; then
			echo "      : $line"
			ret=$ret$line
		fi
		if \[\[ $line == *"OK"* \]\] ; then
			return 0
		fi
		if \[\[ $line == *"ERROR"* \]\] || \[\[ $line == *"NO CARRIER"* \]\]; then 
			return -1
		fi
	done

}

if [ -e "$ATinterface" ]
then
	echo "Using $ATinterface"
else
	echo "$ATinterface is not found, turn on the modem"
fi

send_command "\rATE0\r"         # Echo off
send_command "AT+CMEE=2\r"	# Verbose ERRORs
send_command "AT+CPIN?\r"	# SIM / PIN status
result=$?
if [ $result != 0 ] 
then 
	echo "ERROR: SIM / PIN problem"
	exit -1
fi
send_command "AT+COPS=2\r"    # De-register from network
send_command "AT+CGDCONT=3\r" # Reset PDP context 3
send_command "AT+CGDCONT=3,\"IP\",\"$APN\"\r" # Set APN 
#send_command "AT+COPS=0\r"   # Register Automatically
send_command "AT+COPS=1,1,\"Partner\",7\r" # Reg. Partner LTE
send_command "AT+COPS?\r"     # Check registration status
send_command "AT^SWWAN?\r"    # Check WAN network status 
send_command "AT^SWWAN=1,3\r" # Activate WAN network


rbrenk's picture
rbrenk

When I try these instructions on vodafone NL the AT+SWWAN=1,3 is followed by an ERROR. 

The registration status seems all Ok.

AT+CFUN?

+CFUN: 1,0

OK

AT+CREG?

+CREG: 0,1

OK

AT+CEREG?

+CEREG: 0,1

OK

AT+CPIN? 

+CPIN: READY

OK

AT+CIMI

204045100590580

OK

AT+COPS?

+COPS: 0,0,"vodafone NL",7

AT+CGDCONT=3,"IP","office.vodafone.nl"

OK

AT^SWWAN=1,3

ERROR

For instance sending SMS etc is working fine.

Do you have any idea why this would fail for me?

The only strange thing I can see is:

AT^SIND="ratmode",2

^SIND: ratmode,0,99

Which seems wrong to me?

With the same SIM card in a PLS-8 device it works fine.

Best regards,

Rudger

mullengers's picture
mullengers

Hi Rudger,

1. Which module are you using? Send the command "ATI1" to find out.

2. Turn on extended errors with AT+CMEE=2 and try the AT^SWWAN again.

Best regards

Simon

rbrenk's picture
rbrenk

Hi Simon,

I've rerun the script and added ATI1 en CMEE errors:

ATI1

Cinterion

PLS62-W

REVISION 02.000

A-REVISION 01.000.02

OK

And the CMEE error of AT^SWWAN is not very helpful

AT^SWWAN?

OK

AT^SWWAN=1,3

+CME ERROR: Unknown

cmd:AT+CEER

+CEER: "No report available"

OK

I added log output of my script, still I think the ratmode is strange?

Thanks,

Rudgerpls62_log.txt

rbrenk's picture
rbrenk

Since it was kind of wierd the CID1 can't be removed, I tried to use CID1 instead of CID3 and this gives me some aditional errors.

AT cmd:AT^SWWAN=1,1

      : +CME ERROR: Unknown

AT cmd:AT+CEER

      : +CEER: "SM deactivation",187,"Last PDN disconnection not allowed"

      : OK

Also the APN before connection was:

AT cmd:AT+CGDCONT?

      : +CGDCONT: 1,"IP","office.vodafone.nl","",0,0

      : OK

And after activation:

AT cmd:AT+CGDCONT?

      : +CGDCONT: 1,"IP","office.vodafone.nl.mnc004.mcc204.gprs","",0,0

      : OK

Why it this changed after trying to connect? And what does the nc004.mcc204.gprs which was added mean?

Thanks,

Rudgerpls62_log_cid1.txt

cmowder