Send data to cayenne using A7 madule(Gprs)

hello
i wanna to send data to cayenne with nodeMcu and use GPRS madule
How can i send Data with Gprs?

if you GSM/GPRS module then you can use https://github.com/myDevicesIoT/Cayenne-MQTT-Arduino/blob/master/examples/Connections/GSM/GSM.ino

thank you …
i use this library but i have a problem

`⸮s⸮⸮⸮[90433] Initializing modem
[100667] Cannot init
[100667] Waiting for network
[160813] Register failed
[221459] Register failed

whats the problem?

it looks like your GSM module is not connecting to the respective network. This can be because of not enough power supply, or using an unsupported GSM module.
can you check if any other basic GSM library works with your GSM module.

tanks for reply
the problem was related to Common GNG between NodeMcu and A7 module.
Now Node mcu is Connected to Cayenne Server But there is no data transfer to dashboard.
this is Cayenne log:

⸮{⸮|⸮⸮[25021] Initializing modem
[26622] Waiting for network
[32797] Connecting to GPRS
[46061] Connected to GPRS
[46126] IP: 100.100.72.153
[46126] Connecting to mqtt.mydevices.com:1883
[50562] Connected

i use standard library example for my test.
whats the problem?

It is publishing data. Check your cayenne dashboard if you see any data been loaded.
You can add #define CAYENNE_DEBUG in your code to check logs in the serial monitor .

2 Likes

Thank for Reply.
Every things is Ok but after hours Internet connection go down and if i reboot ESP it work again.i want find a way to reboot esp when nodemcu Cant publish data.
How Can i reboot nodemcu when cayenne Cant publish data?

you need to check the serial monitor for what is causing the data to be not published.

serial monitor log is “network connect failed”

this means that some issue with your internet connection. though if want to restart your esp when this happens try this approach:

CAYENNE_DISCONNECTED() {
  ESP.restart();
}
2 Likes