Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
Greetings
I changed the SIM and mounted a tested working one on a phone, my problem is that it does not receive IP from the cellular network, even if the signal is there.
Latest firmware version available
What can it be?
Thank you
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Check that you have correct APN and dial number settings.
Post what you have in System config > Status > System log.
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(23.05.2024, 07:52) admin Wrote: Check that you have correct APN and dial number settings.
Post what you have in System config > Status > System log.
APN is correct
need the dial number of SIM ?
thank's
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Default dial number is *99***1# but it might be different, check with your operator.
Also post what you have in System config > Status > System log.
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(23.05.2024, 07:58) admin Wrote: Default dial number is *99***1# but it might be different, check with your operator.
Also post what you have in System config > Status > System log.the dial number be set in 3G/4G/ ppp connection or in resident sms script?
in system log see
May 23 08:04:52 LM5R_VERGATO daemon.err pppd[1932]: Connect script failed
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Dial number is set in System config > Network. But you don't need to specify it if the default one is used.
Is SMS script working for you?
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(23.05.2024, 08:11) admin Wrote: Dial number is set in System config > Network. But you don't need to specify it if the default one is used.
Is SMS script working for you?
Yes I use only one number
the error il log why? error ppp connection, not have ip from mobile network.
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
If SMS script is working then the hardware is ok. This means that your configuration is wrong. Maybe a username or password is needed. Your operator should provide all settings - APN, user/password (if applicable) and dial-up number.
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(23.05.2024, 08:31) admin Wrote: If SMS script is working then the hardware is ok. This means that your configuration is wrong. Maybe a username or password is needed. Your operator should provide all settings - APN, user/password (if applicable) and dial-up number.
I use same SIM OPERATOR on other LM REACTOR and the same config working good , this no ?
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Have you tried using this SIM on a different LM?
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(23.05.2024, 08:48) admin Wrote: Have you tried using this SIM on a different LM?
Now I have put new SIM tested on other LM and the new SIM working on ther LM.
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
24.05.2024, 06:27
(This post was last modified: 24.05.2024, 07:27 by Frank68 .)
(23.05.2024, 08:51) Frank68 Wrote: (23.05.2024, 08:48) admin Wrote: Have you tried using this SIM on a different LM?
Now I have put new SIM tested on other LM and the new SIM working on ther LM.
now I have ip from network but have this problem in log
attempt to call global 'sendsms' (a nil value) stack traceback:
thank's
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
It's not a user script, it's an init sequence of the 3g/4g services. Usually this error means that the configuration is incorrect.
If you are sure that all settings are correct then the only option is to replace the SIM card.
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(24.05.2024, 07:31) admin Wrote: It's not a user script, it's an init sequence of the 3g/4g services. Usually this error means that the configuration is incorrect.
If you are sure that all settings are correct then the only option is to replace the SIM card.
I check the sim on phone and work correctly
the IP is provided from mobile netwok but have this error.
???
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Disable SMS script and 3g/4g connection then run this script once and post what you get in Logs. Don't forget to change apn variable value.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
apn =
'PUT_YOUR_APN_HERE'
dial =
'*99***1#'
io.writefile (
'/sys/class/gpio/export' ,
8 )
io.writefile (
'/sys/class/gpio/export' ,
71 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'high' )
os.sleep (
1 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'low' )
io.writefile (
'/sys/class/gpio/gpio71/direction' ,
'high' )
tty1 =
'/dev/ttyACM3'
tty2 =
'/dev/ttyUSB2'
for i =
1 ,
20 do
os.sleep (
1 )
if io.exists (
tty1 )
then
tty =
tty1
break
elseif io.exists (
tty2 )
then
tty =
tty2
break
end
end
if not tty then
log (
'init failed' )
return
end
buf = {}
function send (
cmd ,
timeout )
port :
write (
cmd ..
'\r\n' )
local res ,
err =
port :
read (
1000 ,
timeout or 1 )
return res ,
err
end
function sendlog (
cmd ,
timeout )
local res =
send (
cmd ,
timeout )
if res then
buf [ #
buf +
1 ] =
res
end
end
port =
require (
'serial' ).
open (
tty )
log (
'open port' ,
tty )
for i =
1 ,
20 do
res =
send (
'AT' )
if res then
break
end
end
if not res then
log (
'no response' )
return
end
sendlog (
'AT&F' ,
10 )
sendlog (
'ATE1' )
sendlog (
'AT+CGDCONT=1,"IP","' ..
apn ..
'"' )
sendlog (
'ATD' ..
dial )
res =
table.concat (
buf )
log (
res )
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(24.05.2024, 08:45) admin Wrote: Disable SMS script and 3g/4g connection then run this script once and post what you get in Logs. Don't forget to change apn variable value.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
apn =
'PUT_YOUR_APN_HERE'
dial =
'*99***1#'
io.writefile (
'/sys/class/gpio/export' ,
8 )
io.writefile (
'/sys/class/gpio/export' ,
71 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'high' )
os.sleep (
1 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'low' )
io.writefile (
'/sys/class/gpio/gpio71/direction' ,
'high' )
tty1 =
'/dev/ttyACM3'
tty2 =
'/dev/ttyUSB2'
for i =
1 ,
20 do
os.sleep (
1 )
if io.exists (
tty1 )
then
tty =
tty1
break
elseif io.exists (
tty2 )
then
tty =
tty2
break
end
end
if not tty then
log (
'init failed' )
return
end
buf = {}
function send (
cmd ,
timeout )
port :
write (
cmd ..
'\r\n' )
local res ,
err =
port :
read (
1000 ,
timeout or 1 )
return res ,
err
end
function sendlog (
cmd ,
timeout )
local res =
send (
cmd ,
timeout )
if res then
buf [ #
buf +
1 ] =
res
end
end
port =
require (
'serial' ).
open (
tty )
log (
'open port' ,
tty )
for i =
1 ,
20 do
res =
send (
'AT' )
if res then
break
end
end
if not res then
log (
'no response' )
return
end
sendlog (
'AT&F' ,
10 )
sendlog (
'ATE1' )
sendlog (
'AT+CGDCONT=1,"IP","' ..
apn ..
'"' )
sendlog (
'ATD' ..
dial )
res =
table.concat (
buf )
log (
res )
this is the log file
* string: AT&F
OK
+CPIN: READY
SMS DONE
PB DONE
NO CARRIER
+PPPD: DISCONNECTED
ATE1
OK
AT+CGDCONT=1,"IP","internet.it"
OK
ATD*3332958126#
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Keep the dial number default (dial = '*99***1#' ) and try again. This number is never your SIM number.
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
(24.05.2024, 08:59) admin Wrote: Keep the dial number default (dial = '*99***1#' ) and try again. This number is never your SIM number.
the log
* string: AT&F
OK
+CPIN: READY
SMS DONE
PB DONE
NO CARRIER
+PPPD: DISCONNECTED
ATE1
OK
AT+CGDCONT=1,"IP","internet.it"
OK
ATD*99***1#
CONNECT 115200
Posts: 8097
Threads: 43
Joined: Jun 2015
Reputation:
471
Connect script fails because of "NO CARRIER" message meaning that there's no mobile connection.
Run this updated script and post what you get in Logs:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
io.writefile (
'/sys/class/gpio/export' ,
8 )
io.writefile (
'/sys/class/gpio/export' ,
71 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'high' )
os.sleep (
1 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'low' )
io.writefile (
'/sys/class/gpio/gpio71/direction' ,
'high' )
tty1 =
'/dev/ttyACM3'
tty2 =
'/dev/ttyUSB2'
for i =
1 ,
20 do
os.sleep (
1 )
if io.exists (
tty1 )
then
tty =
tty1
break
elseif io.exists (
tty2 )
then
tty =
tty2
break
end
end
if not tty then
log (
'init failed' )
return
end
buf = {}
function send (
cmd ,
timeout )
port :
flush ()
port :
write (
cmd ..
'\r\n' )
local res ,
err =
port :
read (
1000 ,
timeout or 1 )
return res ,
err
end
function sendlog (
cmd ,
timeout )
local res =
send (
cmd ,
timeout )
if res then
buf [ #
buf +
1 ] =
res
end
return res
end
port =
require (
'serial' ).
open (
tty )
log (
'open port' ,
tty )
for i =
1 ,
20 do
res =
send (
'AT' )
if res then
break
end
end
if not res then
log (
'no response' )
return
end
sendlog (
'AT&F' ,
10 )
sendlog (
'ATE1' )
function readstatus ()
local data ,
res ,
simok ,
network
data =
sendlog (
'AT+CSQ' )
if data then
res =
data :
match (
'+CSQ: (%d+)' )
res =
tonumber (
res )
if res then
log (
'Signal: ' ..
tostring (
res ))
else
log (
'Signal: no response' )
end
else
log (
'Signal: no data from port' )
end
data =
sendlog (
'AT+CPIN?' )
or ''
if data :
find (
'CME ERROR' )
then
log (
'SIM: not found' )
elseif data :
find (
'+CPIN: READY' )
then
log (
'SIM: OK' )
simok =
true
else
log (
'SIM: unknown' )
end
data =
sendlog (
'AT+COPS?' )
if data then
res =
data :
match (
'+COPS: %d+,%d+,"(.*)",%d+' )
if res then
log (
'Network: ' ..
tostring (
res ))
network =
res
else
log (
'Network: no info' )
end
else
log (
'Network: no data from port' )
end
return simok and network
end
for i =
1 ,
20 do
if readstatus ()
then
break
end
end
res =
table.concat (
buf )
log (
res )
Posts: 341
Threads: 130
Joined: May 2020
Reputation:
0
24.05.2024, 09:35
(This post was last modified: 24.05.2024, 09:41 by Frank68 .)
(24.05.2024, 09:27) admin Wrote: Connect script fails because of "NO CARRIER" message meaning that there's no mobile connection.
Run this updated script and post what you get in Logs:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
io.writefile (
'/sys/class/gpio/export' ,
8 )
io.writefile (
'/sys/class/gpio/export' ,
71 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'high' )
os.sleep (
1 )
io.writefile (
'/sys/class/gpio/gpio8/direction' ,
'low' )
io.writefile (
'/sys/class/gpio/gpio71/direction' ,
'high' )
tty1 =
'/dev/ttyACM3'
tty2 =
'/dev/ttyUSB2'
for i =
1 ,
20 do
os.sleep (
1 )
if io.exists (
tty1 )
then
tty =
tty1
break
elseif io.exists (
tty2 )
then
tty =
tty2
break
end
end
if not tty then
log (
'init failed' )
return
end
buf = {}
function send (
cmd ,
timeout )
port :
flush ()
port :
write (
cmd ..
'\r\n' )
local res ,
err =
port :
read (
1000 ,
timeout or 1 )
return res ,
err
end
function sendlog (
cmd ,
timeout )
local res =
send (
cmd ,
timeout )
if res then
buf [ #
buf +
1 ] =
res
end
return res
end
port =
require (
'serial' ).
open (
tty )
log (
'open port' ,
tty )
for i =
1 ,
20 do
res =
send (
'AT' )
if res then
break
end
end
if not res then
log (
'no response' )
return
end
sendlog (
'AT&F' ,
10 )
sendlog (
'ATE1' )
function readstatus ()
local data ,
res ,
simok ,
network
data =
sendlog (
'AT+CSQ' )
if data then
res =
data :
match (
'+CSQ: (%d+)' )
res =
tonumber (
res )
if res then
log (
'Signal: ' ..
tostring (
res ))
else
log (
'Signal: no response' )
end
else
log (
'Signal: no data from port' )
end
data =
sendlog (
'AT+CPIN?' )
or ''
if data :
find (
'CME ERROR' )
then
log (
'SIM: not found' )
elseif data :
find (
'+CPIN: READY' )
then
log (
'SIM: OK' )
simok =
true
else
log (
'SIM: unknown' )
end
data =
sendlog (
'AT+COPS?' )
if data then
res =
data :
match (
'+COPS: %d+,%d+,"(.*)",%d+' )
if res then
log (
'Network: ' ..
tostring (
res ))
network =
res
else
log (
'Network: no info' )
end
else
log (
'Network: no data from port' )
end
return simok and network
end
for i =
1 ,
20 do
if readstatus ()
then
break
end
end
res =
table.concat (
buf )
log (
res )
after restart
* string: AT&F
OK
+CPIN: READY
SMS DONE
PB DONE
NO CARRIER
+PPPD: DISCONNECTED
ATE1
OK
AT+CSQ
+CSQ: 99,99
OK
AT+CPIN?
+CPIN: READY
OK
AT+COPS?
+COPS: 0
OK
AT+CSQ
+CSQ: 99,99
OK
NO CARRIER
+PPPD: DISCONNECTED
AT+CPIN?
+CPIN: READY
OK
AT+COPS?
+COPS: 0
OK
AT+CSQ
+CSQ: 99,99
OK
AT+CPIN?
+CPIN: READY
OK
AT+COPS?
+COPS: 0
OK
AT+CSQ
+CSQ: 12,99
OK
AT+CPIN?
+CPIN: READY
OK
AT+COPS?
+COPS: 0,0,"WINDTRE",2
OK