Всем привет! Прошу помощи Почитал похожие топики, но решения которые там есть никак не работают. У меня останавливается скетч если нет подключения gprs.
Blynk.config пробовал из разных топиков. За основу сейчас взят скетч от PeteKnight (этот)
Hello! I ask for help . I read similar topics, but the solutions that are there do not work in any way. My sketch stops if there is no gprs connection.
I tried Blynk.config from different topics. The sketch from PeteKnight is now taken as a basis.(
this)
The code that you’ve linked to wasn’t a complete sketch, just part of void setup that deals with the GPRS and Blynk connection process.
Maybe you should post you’re entire code and explain exactly what happens when no GPRS connection is available.
Explaining your hardware would also be a good idea.
22:13:40.151 -> Waiting for network... OK
22:13:40.185 -> Network connected
22:13:40.218 -> Connecting to APN: internet OK
22:13:45.269 -> [8200]
22:13:45.269 -> ___ __ __
22:13:45.303 -> / _ )/ /_ _____ / /__
22:13:45.337 -> / _ / / // / _ \/ '_/
22:13:45.371 -> /____/_/\_, /_//_/_/\_\
22:13:45.371 -> /___/ v0.6.1 on Arduino Mega
22:13:45.439 ->
22:13:45.439 -> [8368] Connecting to blynk-cloud.com:8080
22:13:47.844 -> [10783] Ready (ping: 1574ms).
22:14:07.840 -> Модуль ответил на звонок
Hardware: Arduino Mega 2560, SIM800L.
With this code I connect to gprs, everything works, it connects to Blynk. If I call the module from a mobile phone, it picks up the receiver. But if gprs is not connected, then the module constantly tries to connect to gprs and does NOT pick up the phone when calling from a mobile phone.
In my future project, I will manage everything using Blynk, and if there is no gprs connection, then the module should enable what I need using a call from a mobile phone.
Can it be somehow possible to do that after several attempts the modem will stop connecting and start processing calls for a few minutes, and then try to connect again?
You could disconnect from Blynk on a regular basis and listen for incoming calls, but then you have the worst of both worlds.
I suppose you could have a widget to switch the Blynk connection off, then re-connect once the Incommunities g call has been handled, but also very messy.
In my opinion you need two devices - one to communicate with Blynk via GPRS and one to handle your incoming calls.
I connected the second modem. First, I checked it separately, it works, it responds to commands. But I can’t figure out how to manage two modems. Please look at the sketch, what am I doing wrong?
I have no idea, as I’ve never used a modem to answer incoming calls, but I guess I would start by looking at the separate sketches that work, and see what the difference is between them and this combined sketch.
In your “non Blynk connection, answer ring only” sketch, are you declaring a modem object? I ask because you only have one declared and initialised in your sketch.
That means you must have two sketches - one that connects to Blynk and communicates with the Blynk server using GPRS, and the second one that does not connect to Blynk but just sits and listens for incoming calls.
It’s the second sketch than I’m talking about when I say your “non Blynk connection, answer ring only” sketch.