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

“network connect failed”
thanks for the reply.
the problem i still exist.
The device is working fine but after few hours, sometimes after 2 days the device stops transmitting data, when i try calling the sim card it get through and i can hear it ring, but somehow the data is no transmitted. Upon disconnecting from power and reconnecting the device start sending data again and stops after a while.
reboot the esp don’t help because reboot esp don’t reboot A6 module.
replacing power supply and GSM module don’t change any things.

i really confused :confused:
please help

there can be many reason for the disconnect after 2 days, and it is not possible to detect what is causing it.

i think easiest solution is a way to disconnect power from A6 module and connect again .
using MOSFET or relay :thinking:

that can you done in similar way using the same function.