Where are you getting your information about how to communicate with the devices?
For this part I looked in the source for the EV3 and the source for LeJos…
It looks like you are trying to read a byte, clear a bit, and then write it back. However you are not reading and writing from the same place. You are reading from “port” and writing to “UartStatusOffset+port”
I will have a look at this tonigh