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.

problem with 4g modem
#21
Post what you have in System config > Status > System log.
Reply
#22
Hi,

Thank for the quick reply.
Here it goes.

Attached Files Thumbnail(s)
   
Reply
#23
What LM hardware model are you using?
Reply
#24
LM5p2-RIO3LTE

LM5M3CV15xA23010267
Reply
#25
Do you have 3G/4G connection enabled? If it's disabled then the on-board modem won't be initialized.
Reply
#26
It was disabled. When we try to enable it the LM stops responding.
Reply
#27
This most likely caused by LM using mobile connection gateway instead of Ethernet.
Follow this guide if you only need SMS without 3G/4G: https://forum.logicmachine.net/showthrea...7#pid33127
Reply
#28
It worked. Thanks!

I still have a strange situation. In the alert I still get "SMS handler lost connection" but the SMS are getting through. I only happens with a card from one provider. Using a card from a different provider it doesn't happen.

Attached Files Thumbnail(s)
   
Reply
#29
Modify AT:run() function in the user library as follows and post what you get in LM Logs tab.
Code:
function AT:run()
  local res, err, cmd, pos, sms

  res, err = self:read()
  if err then
    if err ~= 'timeout' then
      log('run error', err)
    end

    return err == 'timeout'
  end

  -- check for incoming command
  if res:sub(1, 1) ~= '+' then
    return true
  end

  pos = res:find(':', 1, true)

  if not pos then
    return true
  end

  -- get command type
  cmd = res:sub(2, pos - 1)

  -- check only for incoming sms
  if cmd ~= 'CMTI' then
    log('run cmd', cmd)

    return
  end

  -- read from sim
  sms = self:incsms(res)

  -- sms seems to be valid, pass to handler if specified
  if sms and self.smshandler then
    self.smshandler(sms)
  end

  return true
end
Reply
#30
Here goes the log.

Attached Files Thumbnail(s)
   
Reply
#31
Change the same function as follows and see if it helps.
Code:
function AT:run()
  local res, err, cmd, pos, sms

  res, err = self:read()
  if err then
    return err == 'timeout'
  end

  -- check for incoming command
  if res:sub(1, 1) ~= '+' then
    return true
  end

  pos = res:find(':', 1, true)

  if not pos then
    return true
  end

  -- get command type
  cmd = res:sub(2, pos - 1)

  -- check only for incoming sms
  if cmd == 'CMTI' then
    -- read from sim
    sms = self:incsms(res)

    -- sms seems to be valid, pass to handler if specified
    if sms and self.smshandler then
      self.smshandler(sms)
    end
  end

  return true
end
Reply


Forum Jump: