The illegalStateException was related to something else. I am still getting null...
Thanks Julie! I tried your suggestion however now im getting IllegalMonitoringStateException...
I have modbus master that was working perfectly communicating via both TCP and Serial...