Receiving data from two serial ports

sarouje:
I think I am not getting the issue here.

if(Serial1.available()>0)

{
  //Serial1 data available
}




will that tell you, the data is coming from Serial1?

@Robin's tutorial is a great start to write non blocking serial read. It might seems complex at first but that's the right approach.

I'm sorry. I didnt test the second part I posted, it's getting late here. I was just wondering if something like that could work when keeping in mind that only one device will talk to the Arduino.