Arduino Due difference with Mega

I have a shield that connects to GSM .

When I upload my code to a Mega, the shield connects just fine through any of the hardware serials.

But, same PIN config, same code, same Baud rate, just wont work with the Due. It is very frustrating.

I made a connection sending information from DUE to Mega through those Hardware serial ports and the information gets transmitted just fine.

Is there any significant difference that I am missing from the DUE to the MEGA?

Different architecture MCU's often require different libraries and approaches to code.

Just because something fits one board does not mean it is usable for all boards.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.