The fact that the wires connected there doesn't mean that connection used a Serial2 port.
I think it was due the fact, that you not quite understand what are you doing, so you edition of the code was incorrect. It would be useful if you show the code after your editing.