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
#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


Messages In This Thread
problem with 4g modem - by Frank68 - 31.01.2022, 14:03
RE: problem with 4g modem - by admin - 31.01.2022, 15:30
RE: problem with 4g modem - by Frank68 - 31.01.2022, 16:05
RE: problem with 4g modem - by admin - 01.02.2022, 08:20
RE: problem with 4g modem - by Frank68 - 01.02.2022, 12:12
RE: problem with 4g modem - by admin - 01.02.2022, 12:18
RE: problem with 4g modem - by Frank68 - 01.02.2022, 12:24
RE: problem with 4g modem - by admin - 01.02.2022, 13:35
RE: problem with 4g modem - by Frank68 - 01.02.2022, 14:54
RE: problem with 4g modem - by admin - 01.02.2022, 14:56
RE: problem with 4g modem - by Frank68 - 01.02.2022, 15:08
RE: problem with 4g modem - by admin - 02.02.2022, 09:13
RE: problem with 4g modem - by Frank68 - 02.02.2022, 09:23
RE: problem with 4g modem - by admin - 02.02.2022, 09:24
RE: problem with 4g modem - by admin - 02.02.2022, 09:53
RE: problem with 4g modem - by Frank68 - 02.02.2022, 09:54
RE: problem with 4g modem - by Frank68 - 02.02.2022, 14:06
RE: problem with 4g modem - by admin - 03.02.2022, 07:27
RE: problem with 4g modem - by Frank68 - 03.02.2022, 07:32
RE: problem with 4g modem - by admin - 01.07.2024, 09:01
RE: problem with 4g modem - by admin - 01.07.2024, 09:34
RE: problem with 4g modem - by admin - 01.07.2024, 09:48
RE: problem with 4g modem - by admin - 01.07.2024, 10:22
RE: problem with 4g modem - by admin - 01.07.2024, 12:22
RE: problem with 4g modem - by admin - 01.07.2024, 14:08
RE: problem with 4g modem - by EjvindHald - 26.09.2025, 11:22
RE: problem with 4g modem - by admin - 26.09.2025, 12:34
RE: problem with 4g modem - by EjvindHald - 26.09.2025, 13:27
RE: problem with 4g modem - by admin - 26.09.2025, 13:34
RE: problem with 4g modem - by EjvindHald - 26.09.2025, 13:39
RE: problem with 4g modem - by admin - 26.09.2025, 13:40
RE: problem with 4g modem - by EjvindHald - 26.09.2025, 13:52
RE: problem with 4g modem - by admin - 26.09.2025, 14:11
RE: problem with 4g modem - by EjvindHald - 26.09.2025, 14:19
RE: problem with 4g modem - by EjvindHald - 29.09.2025, 06:43
RE: problem with 4g modem - by admin - 29.09.2025, 06:55
RE: problem with 4g modem - by EjvindHald - 29.09.2025, 16:51
RE: problem with 4g modem - by admin - 01.10.2025, 10:38

Forum Jump: