You need some method to discriminate between the two pieces of data. If the device is sending the exact same string of data every time, you can check for that and have a reasonably good idea where it came from. If not, well, then you're going to have to come up with some kind of protocol, like "framing" data, that your external devices are going to need to use to identify themselves as the source. Or, put each device on it's own serial port.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak