Posts: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
Check that you have correct APN and dial number settings.
Post what you have in System config > Status > System log.
Posts: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
Have you tried using this SIM on a different LM?
Posts: 327
Threads: 126
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: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 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) -- reset settings
sendlog('ATE1') -- echo enabled
sendlog('AT+CGDCONT=1,"IP","' .. apn .. '"') -- set apn
sendlog('ATD' .. dial) -- connect
res = table.concat(buf)
log(res)
Posts: 327
Threads: 126
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: 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) -- reset settings
sendlog('ATE1') -- echo enabled
sendlog('AT+CGDCONT=1,"IP","' .. apn .. '"') -- set apn
sendlog('ATD' .. dial) -- connect
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
Keep the dial number default (dial = '*99***1#') and try again. This number is never your SIM number.
Posts: 327
Threads: 126
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: 7757
Threads: 42
Joined: Jun 2015
Reputation:
447
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: 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) -- reset settings
sendlog('ATE1') -- echo enabled
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: 327
Threads: 126
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: 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) -- reset settings
sendlog('ATE1') -- echo enabled
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
|