Problem connecting to Cloud with UNO and GSM A6

…как явно задать IP .?
У меня тоже не коннектится

Hello. Tacking a “me Too” onto others topics is not recomended.

Read the// commented instructions included in the examples… Ping blynk-cloud.com and use that IP as shown…
image

Although the new port to use for Cloud is now 80… or just leave it out.

This will also work… with IP numbers in place of the xxx and noting that this method requires periods, not commas.

Blynk.begin(auth, ssid, pass, "xxx.xxx.xxx.xxx", 80);

не помогло…
связка UNO+GSM A6


  #define BLYNK_PRINT Serial    // Comment this out to disable prints and save space
 #define TINY_GSM_MODEM_A6
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
const char auth[] = "d911f37051f2459db8fb8b894f0e159b";

// Your GPRS credentials
// Leave empty, if missing user or pass
//const char apn[]  = "internet.tele2.ru"; // TELE2
const char apn[]  = "internet"; // MEGAFON
const char user[] = "";
const char pass[] = "";

// Hardware Serial on Mega, Leonardo, Micro
//#define SerialAT Serial

#define ledPin     5

// or Software Serial on Uno, Nano
#include <SoftwareSerial.h>
SoftwareSerial SerialAT(2, 3); // RX, TX

TinyGsm modem(SerialAT);

//**********************************************************
 //  BLYNK_WRITE(V3)
 //  {
// analogWrite(ledPin, param.asInt() );  
 //  }
//*********************************************************

void setup()
{
  // Set console baud rate
  Serial.begin(9600);
  delay(10);

  // Set GSM module baud rate
  SerialAT.begin(9600);
  delay(3000);

  // Restart takes quite some time
  // To skip it, call init() instead of restart()
  Serial.println("Initializing modem...");
  modem.restart();

  String modemInfo = modem.getModemInfo();
  Serial.print("Modem: ");
  Serial.println(modemInfo);

Blynk.begin(auth, modem, apn, user, pass, "139.59.206.133", 80);
//  Blynk.begin(auth, modem, apn, user, pass);
  
}


void loop()
{
  Blynk.run();
 
}

Initializing modem…
Modem: Ai Thinker Co.LTD A6 V03.05.20170090814H38
[10733]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.1 on Arduino Uno

[10874] Modem init…
[11902] Connecting to network…
[57702] Network: MegaFon
[57703] Connecting to internet …
[68131] Connected to GPRS
[68313] Connecting to 139.59.206.133:80
[83149] Connecting to 139.59.206.133:80
[160318] Connecting to 139.59.206.133:80

I moved your issue into a new topic as your issue is nothing like the topic you were in… that used WiFi you are using GSM.

Are you connecting to a Digital Ocean based Local Server of your own? If so, you may need port 8080 and or to configure your host to allow port 80. Hard to say what the issue could be.

я пытаюсь подключиться к blynk-cloud.com
поменял SIM карту

C:\Users\user>ping  blynk-cloud.com

Обмен пакетами с blynk-cloud.com [139.59.206.133] с 32 байтами данных:
Ответ от 139.59.206.133: число байт=32 время=51мс TTL=59
Ответ от 139.59.206.133: число байт=32 время=51мс TTL=59
Ответ от 139.59.206.133: число байт=32 время=51мс TTL=59
Ответ от 139.59.206.133: число байт=32 время=86мс TTL=59

Статистика Ping для 139.59.206.133:
    Пакетов: отправлено = 4, получено = 4, потеряно = 0
    (0% потерь)
Приблизительное время приема-передачи в мс:
    Минимальное = 51мсек, Максимальное = 86 мсек, Среднее = 59 мсек

Initializing modem…
Modem: Ai Thinker Co.LTD A6 V03.05.20170090814H38
[9123]
___ __ __
/ _ )/ /_ _____ / /__
/ _ / / // / _ / '/
/
//_, /////_
/
__/ v0.5.1 on Arduino Uno

[9264] Modem init…
[12164] Connecting to network…
[12540] Network: Tele2
[12541] Connecting to internet.tele2.ru
[14486] Connected to GPRS
[14668] Connecting to blynk-cloud.com:80
[34892] Connecting to blynk-cloud.com:80
[112062] Connecting to blynk-cloud.com:80
[189230] Connecting to blynk-cloud.com:80

Yes… further investigation showed that :blush:

OK, so will either of these work? Did it ever work?

Blynk.begin(auth, modem, apn, user, pass);

Blynk.begin(auth, modem, apn, user, pass, blynk-cloud.com);

Blynk.begin(auth, modem, apn, user, pass, blynk-cloud.com, 80);

I have never used a GSM modem, so you probably need to wait for someone else to help… meanwhile, keep searching this forum for other GSM related topics to read what they have done.

https://community.blynk.cc/search?q=GSM%20A6%20order%3Alatest

Не мог подключиться, пока не сделал:
Скорость обмена 115200 и для модуля, и для ПК
закомментировал эту строку: modem.restart();

подключил NEOWAY m590, порт на скорости 9600 (на UNO кажется софтовый UART не поднимется на бОльших скоростях) и задал адрес облака явно Blynk.begin(auth, modem, apn, user, pass, “139.59.206.133”, 80);

modem.restart(); никак не влияет на работу

А6 так и не удалось подключить к BLYNK

i had same issue. try to change baudrate with bigger value. ex. 115200
it cant connect with lower baudrate . propably due to serial owerflow. or something like that.

If you’re using software serial, as in the example from @getUP, then trying to connect to a GSM module at anything faster than 9600 baud won’t produce good results.

The key issue is that the GSM device needs to be trying to communicate at the same baud rate as the Arduino. This is generally done by connecting the GSM to a PC via an FTDI interface and issuing an AT command to set the communication rate.

Pete.

maybe. but my problem is baudrate with same module. “a6”
i tried many things but actually s.serial not working for uno with 9600 baudrate. same on hardware serial with 9600 baud on “a6” module eith arduino uno. i changed both side baud on a6 and uno to 9600,it failled, maybe a6 related

М590 и а6 работают на скорости 9600. Но а6 не подключается к облаку. М590 подключается по явному IP. Соединение м590 не стабильно. Записал модуль от надёжного блока питания. Стало лучше. Но все равно периодически пропадает соединение и не может восстановиться. Помогает перезагрузка UNO. Где проблема незнаю. Заказал sim800 буду пробовать на нем.

запустил blynk на STM 32, проверил скорости работы UART модулей gsm A6 и M590. оба ответили только на 9600.
в конфигурации STM 32+ gsm A6 тоже что и c UNO+ gsm A6 не может подключиться к облаку.
в конфигурации STM 32+ gsm M590 зависает на Connected to GPRS.

if google translate did right translate, you need to connect serial adapter to directly a6 and change boudrate to bigger one. and use same baud on arduino uno.

скорость UART модуля A6 выбирается автоматически. Завтра попробую настроить A6 через AT команды. может там жестко прописано

купил 2560 атмегу. подключил модемы на скорости 115200, М590 запустился но периодически отваливается, SIM800 запустился работал стабиьльно сутки , теперь происходит так - стартует без проблем через какое-то время теряет соединение с ОБЛАКОМ И уходит в бесконечный реконнект Connecting to 139.59.206.133:80, помогает перезагрузка (иногда соединение поднимается само но редко), модем A6 в принципе не коннектится, как и раньше, к облаку.
вот теперь вопрос это проблема ОБЛАКА или модемов. почему теряют соединение с облаком и почему не могут повторно присоединиться

Using Blynk.config() instead of Blynk.Begin() and trying out various connection management methods are probably required.

в тесте собрал , 2560 атмегу и SIM800
4 день полет нормальный. с чем связаны те случаи “тяжелых” коннектов незнаю