Editing library?

sterretje:
Yep, but OP does not use the shield

Hmmm ok, I didn't mine that nugget in this thread, but I'll take your word for it!

In rey #6 OP mentioned a custom pcb. I might have interpreted that incorrectly though.

Yes I'm building custom PCB myself,and I'm not sure where to connect SIM900 TX and RX

Maybe I should make my PCB match to Arduino's SIM900 shield,and use Arduino's library

Nikola19992:
Maybe I should make my PCB match to Arduino's SIM900 shield,and use Arduino's library

I repeat, all of the libraries allow you to choose the port in the case of hardware serial, and the pins in the case of software serial.

IF memory serves me well, I doubt that that's the case for the specific library that OP is referring to.

Not behind a PC at this moment to verify it.

sterretje:
IF memory serves me well, I doubt that that's the case for the specific library that OP is referring to.

Not behind a PC at this moment to verify it.

See reply #11.

We're talking different libraries, I think.

The below is from SendSMS.ino that comes with the IDE (version 1.6.6 and version 1.6.7).

// Include the GSM library
#include <GSM.h>

#define PINNUMBER ""

// initialize the library instance
GSM gsmAccess;
GSM_SMS sms;

void setup() {
  // initialize serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }

  Serial.println("SMS Messages Sender");

  // connection state
  boolean notConnected = true;

  // Start GSM shield
  // If your SIM has PIN, pass it as a parameter of begin() in quotes
  while (notConnected) {
    if (gsmAccess.begin(PINNUMBER) == GSM_READY) {
      notConnected = false;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("GSM initialized");
}

...
...

The used library is in the Arduino installation directory.

Digging a little through the library and as far as I can see, the GSM class is actually GSM3ShieldV1AccessProvider and that class does not have a constructor or a method to set the pin numbers for RX and TX. But I might have missed it somewhere.