ev3rt-git / ev3rt-hrp2

RTOS for Mindstorms EV3
http://ev3rt-git.github.io
GNU General Public License v2.0
22 stars 16 forks source link

Brick-to-brick UART doesn't seem to work #13

Open spsquared opened 2 years ago

spsquared commented 2 years ago

I've been trying to get two EV3s to communicate over UART using sensor port 1. I've had it disabled in the config and am using the Bluetooth SPP tester to see if it works the same way. It doesn't seem to. Even when constantly writing to the stream on brick 1 and constantly reading and displaying the entire read stream on brick 2 doesn't seem to work.

Brick 1: image Brick 2: image init(); simply sets brick1 and brick2 to the UART file descriptors and starts the uart_rec_task. It just results in a blank screen with nothing on brick 2.

No errors, compiles fine and nothing on the consoles on either brick beside the normal things that get outputted by the upload process.

I've never used UART before but there doesn't seem to be any details online that are available from a few minutes of google search and documentation digging.

Update: I've been able to get it working with Bluetooth and my computer, but brick-to-brick still doesn't work.

Update 2:

I tried some new code and found a few things:

New code: Brick 1: image Brick 2: image

The send counter is going up normally, but the read counter stays at 0. I'm starting to think that even though it is writing to the stream the other brick isn't actually receiving the data. It might write it and only exist locally.

Update 3: I tried enabling sensor port 1 and it just causes the program to stall instantly. Not sure what it means, and I still have no idea if I should have sensor port 1 disabled.