This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

reactor not get ip from GSM
#1
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
Reply
#2
Check that you have correct APN and dial number settings.
Post what you have in System config > Status > System log.
Reply
#3
(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
Reply
#4
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.
Reply
#5
(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
Reply
#6
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?
Reply
#7
(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.
Reply
#8
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.
Reply
#9
(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 ?
Reply
#10
Have you tried using this SIM on a different LM?
Reply
#11
(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.
Reply
#12
(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
Reply
#13
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.
Reply
#14
(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.

???
Reply
#15
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:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
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)
Reply
#16
(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:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
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#
Reply
#17
Keep the dial number default (dial = '*99***1#') and try again. This number is never your SIM number.
Reply
#18
(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
Reply
#19
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:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
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)
Reply
#20
(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:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
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
Reply


Forum Jump: