mega 2560 rev3 + 3G shield

hi,

the issue im having now is when i upload a code, the serial monitor start displaying gibberish and also the mega 2560 board RX light keeps blinking. It means the 3G shield is sending some unknown data to the mega 2560 and i dont know how to fix this.

is there a way to reboot the 3G shield?

regards

Which 3G shield are you using? Posting a link to the shield may help.

im using the shield from cooking hack : Cooking Hacks - Electronic and IoT Kits, tutorials and guides for Makers and Education

That shield apparently uses D0 and D1 for its serial port. That would interfere with the serial monitor, and maybe the code upload.

With a Mega, you can use another hardware serial port if you wish, but it would require bending two pins (D0 and D1) on the shield and jumpering those to another serial port, like serial1. Otherwise you will not be able to use the serial monitor for troubleshooting.

edit: Here is a page that shows a cell shield that uses D2 and D3 for the serial port, and jumpered to serial1 on a Mega. You would need to jumper D0 and D1 instead, and bend those pins on the shield so they do not insert into the Mega.

TX18 and RX19 are under serial1, do i need to include any extra library in my coding to use them?

regards

im using this code to test for respond from the device through TX18 and RX19 like you instruct me. I’ve bend the pins that would directly insert to TX1 and RX0 and used jumper wire (D1 → TX18 and D0 → RX19)

#include <SoftwareSerial.h>

//#define Serial1;//(19, 18); // RX, TX

void setup()  
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  Serial1.begin(4800);
  Serial1.println("Hello, world?");
}

void loop() // run over and over
{
  if (Serial1.available())
    Serial.write(Serial1.read());
  if (Serial.available())
    Serial1.write(Serial.read());
}

there still isnt any respond from the device as viewed from the serial monitor.

is there a mistake i have make somewhere?

Hi,

im having another issue now, when i try to Serial.println(Serial.read()); to check for incoming data from the serial port, the serial monitor keeps showing data non-stop which im not sure what it is.

Serial monitor:
$GPGGA,,,,,,0,,,,,,,,66
$GPRMC,,V,,,,,,,,,,N
53
$GPGSA,A,1,,,,,,,,,,,,,,,1E
$GPVTG,,T,,M,,N,,K
4E
$GPGSV,1,1,0079
$GPGGA,,,,,,0,,,,,,,,66
$GPRMC,,V,,,,,,,,,,N
53
$GPGSA,A,1,,,,,,,,,,,,,,,1E
$GPVTG,,T,,M,,N,,K
4E
$GPGSV,1,1,00
79
$GPGGA,,,,,,0,,,,,,,,66
$GPRMC,,V,,,,,,,,,,N
53
$GPGSA,A,1,,,,,,,,,,,,,,,1E
$GPVTG,,T,,M,,N,,K
4E
$GPGSV,1,1,00*79

Is there any way to stop the never-ending data because i think those data are related to GPS.