OpenWrt X86_64 + Mikrotik R11e-LTE6

:partying_face:

image

2 Likes

Dear mrhaav!

I changed my sim card to another provider. This provider does not have a public ip, I would get a NAT-ed IP. I modified the APN, but the script doesn't want to connect. I wonder why? Can you help me with this?

Strange
Can you run the script manually with debug=true and paste the result?
Stop the Mikrotek service first.

I can't see anything :frowning:

Sorry, I misunderstud you! I stoped the service, and start the script manually. Here are the results:

It is very interesting that there is no LTEmodem entry in the log. With the other SIM / operator there are many log registrarion

You got a network error code +CNEC_GSM: 55,1. I don't know why.
I'm on vacation right now, but I can take a closer look in mid next week.

An other interesting. If I disable the "mikrotikR11" service, that You created for me, and I use my own script on boot than I got IP, and the router is online. My old script:

#!/bin/sh

ifdown WANN
sleep 3
echo -e "AT+ZGDCONT=5,"IP","internet.telekom",0" > /dev/ttyACM0
sleep 3
echo -e "AT+ZGPCOAUTH=5,"","",0" > /dev/ttyACM0
sleep 3
echo -e "AT+CFUN=1" > /dev/ttyACM0
sleep 3
echo -e "AT+ZDHCPLEASE=216000" > /dev/ttyACM0
sleep 3
echo -e "AT+ZGACT=1,5" > /dev/ttyACM0
sleep 3
ifup WANN

Hi
We could try to use profile number 5 instead. Change to 5 here:

# Configure PDPcontext, profile 5
atOut=$(COMMAND="AT+ZGDCONT=5,\"${PDPtype}\",\"${APN}\"" gcom -d "$modemDEV" -s /etc/gcom/run_at.gcom)
[ $debug = true ] && echo $atOut
atOut=$(COMMAND="AT+ZGPCOAUTH=5,\"${username}\",\"${password}\",0" gcom -d "$modemDEV" -s /etc/gcom/run_at.gcom)
[ $debug = true ] && echo $atOut

and here:

	    +CGEV )
		[ $debug = true ] && echo $dateTime $URCline
		if [ "$URCvalue" = 'NW PDN DEACT 5' ]
		then
		    [ $debug = true ] || logger -t LTEmodem -p 6 Session disconnected, release DHCP lease
		    kill -SIGUSR2 $PIDudhcpc
		elif [ "$URCvalue" = 'EPS PDN ACT 5' ] || [ "$URCvalue" = 'NW PDN ACT 5' ]
		then
		    [ $debug = true ] || logger -t LTEmodem -p 6 Activate session
		    atOut=$(COMMAND="AT+ZGACT=1,5" gcom -d "$modemDEV" -s /etc/gcom/at.gcom)
		fi
		;;

BTW. can you run AT+CNEC?

Using username "root".


BusyBox v1.35.0 (2023-01-03 00:24:21 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.3, r20028-43d71ad93e
 -----------------------------------------------------
root@OpenWRT_x86-64:~# mc

root@OpenWRT_x86-64:~# echo -e "AT+CNEC" > /dev/ttyACM0
root@OpenWRT_x86-64:~# COMMAND="AT+CNEC" gcom -d /dev/ttyACM0 -s /etc/gcom/getru
n_at.gcom

ERROR
root@OpenWRT_x86-64:~#

In the script I need to change profile 1 to 5 or insert the new profile 5?

Please, include the "?".
COMMAND="AT+CNEC?" gcom -d /dev/ttyACM0 -s /etc/gcom/getrun_at.gcom

Change to profile 5. Change from 1 > 5 three times in the # Configure PDPcontext and two times in +CGEV.

After I changed the 1 to 5, the script is works i think:

root@OpenWRT_x86-64:~# ./test2.sh
Modem initialization
SIMcard ready
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
2023-05-24 20:28:57 *SIMDETEC:1,SIM
2023-05-24 20:28:57 *ICCID: *************
2023-05-24 20:28:57 *EUICC: 1
2023-05-24 20:28:58 +CESQ: 99,99,255,255,255,255
2023-05-24 20:28:58 *CESQ: 99,99,255,255,255,255,0
2023-05-24 20:28:58 +CSQ: 28,99
2023-05-24 20:28:58 +CESQ: 99,99,255,255,23,58
2023-05-24 20:28:58 *CESQ: 99,99,255,255,23,58,18
2023-05-24 20:28:58 *ADMINDATA: 0, 2, 65535
2023-05-24 20:28:58 +CPIN: READY
2023-05-24 20:28:58 *EUICC: 1
2023-05-24 20:28:58 *ECCLIST: 5, 0, 112, 0, 000, 0, 08, 0, 118, 0, 911
2023-05-24 20:28:59 +MMSG: 0, 0
2023-05-24 20:28:59 +CSQ: 24,99
2023-05-24 20:28:59 +CESQ: 99,99,255,255,15,43
2023-05-24 20:28:59 *CESQ: 99,99,255,255,15,43,9
2023-05-24 20:28:59 +MMSG: 0, 0
2023-05-24 20:28:59 +MMSG: 1, 0
2023-05-24 20:28:59 +CEREG: 1
2023-05-24 20:28:59 +CIREPI: 1
2023-05-24 20:28:59 +CSQ: 24,99
2023-05-24 20:28:59 +CESQ: 46,99,255,255,15,43
2023-05-24 20:28:59 *CESQ: 46,99,255,255,15,43,9
2023-05-24 20:28:59 +CNEMIU: 0
2023-05-24 20:28:59 +CNEMS1: 1
2023-05-24 20:28:59 +CREG: 1
2023-05-24 20:28:59 $CREG: 1
2023-05-24 20:28:59 +CSQ: 24,99
2023-05-24 20:28:59 +CESQ: 46,99,255,255,15,43
2023-05-24 20:28:59 *CESQ: 46,99,255,255,15,43,9
2023-05-24 20:28:59 +CEN1: 1, 216, 30
2023-05-24 20:28:59 +CEN2: 2, 104
2023-05-24 20:28:59 +CEN2: 4, 105
2023-05-24 20:28:59 +CEN2: 1, 107
2023-05-24 20:28:59 +CGEV: NW PDN ACT 5
2023-05-24 20:29:00 OK
2023-05-24 20:29:02 +ZCONSTAT: 1,5
2023-05-24 20:29:02 +ZGIPDNS: 5,"IP","10.172.150.4","10.172.150.4","84.2.44.1","                                                          84.2.46.1","","","",""

Yes, I agree, it looks promising.

The endurance test starts. What is the different between profile 1 and 5?

I think profile 5 is the default profile +CGEV: NW PDN ACT 5.

So is it conceivable that the previous sim could also work with profile five?

Yes, it would probably work with profile 5 as well.

Does the profile number have anything to do with the public ip?

No, the profile number will not affect the IP address. Only your service provider can decide if you get a public IP or not.

Okay. It seems to be okay. It is online , and if necessery it reconnects.

1 Like