Hello everyone,
Recently I have I purchased a BG95 module which is connected to a ESP32-C3 and for sim card I’m using Hologram. I’m trying to configure the BG95 to connect to the hologram network which is registering with T-Mobile. Also I’m trying to POST json data through http to my node js app which is deployed in heroku. Till now I have not had any luck to figure out to send data to my app.
App link: http://insert-app-mongo-c57ab58749e5.herokuapp.com/insertData/0
Sample data: {
“ID”: 53,
“DT”: “2023-12-11 20:00:00”,
“D”: “GPS123”,
“Lng”: 17.061768,
“Lat”: 45.752053
}
Can someone help me with some code that can configure the BG95 and POST the data to the app. I have been trying for about 2 months to make it to work but I can’t find a solid solution.
This is how I start my BG95 :
#include <SoftwareSerial.h>
#define BG95_PWRKEY_PIN 10 // PWRKEY is connected to IO10
#define BG95_TX_PIN 7 // Connect this to the BG95 RX pin
#define BG95_RX_PIN 6 // Connect this to the BG95 TX pin
SoftwareSerial bg95Serial(BG95_RX_PIN, BG95_TX_PIN); // Create a SoftwareSerial port for BG95
void setup() {
pinMode(BG95_PWRKEY_PIN, OUTPUT);
digitalWrite(BG95_PWRKEY_PIN, HIGH);
delay(1000);
digitalWrite(BG95_PWRKEY_PIN, LOW);
delay(50);
// Hold PWRKEY low for at least 1 second to ensure power off
//digitalWrite(BG95_PWRKEY_PIN, HIGH); // Release PWRKEY to power on
//delay(1000); // Allow the module to boot
Serial.begin(115200); // Start the Serial Monitor
bg95Serial.begin(115200); // Start the SoftwareSerial port for BG95
// Initialize communication with BG95
// sendATCommand(“AT”); // Check if the module is responding
// delay(7000);
// sendATCommand(“AT+CGMR”); // Get module firmware version
// delay(7000);
// sendATCommand(“AT+CSQ”); // Get signal quality
// delay(30000);
// sendATCommand(“AT+COPS?”);
}