Using XBee Java Library from multiple threads

I’m using XBee Java Library. Can commands to remote devices (like setDIOValue) be sent over serial port from multiple threads?
If not what are the recommended ways to achieve this?

Thanks,
Prakash

If you write your code correctly and have one thread for the COM port, then you could send and receive commands on different threads direct to that com port.

1 Like

Thanks for your response!
The COM Port is handled by the XBee Java Library internally. We’ve multiple APIs that can be accessed from the application. Channeling all the API calls in a single thread is not an easy task I believe. Would it be better if the library itself synchronizes all COM Port writes? Just thinking…

Not that I am aware of.