You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Brick 2: 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:
fscanf appears to wait for an input from the other end that will match the formatting inputted.
PuTTY does not treat newlines well
fprintf can do escape codes but PuTTY cannot
New code:
Brick 1:
Brick 2:
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.
The text was updated successfully, but these errors were encountered:
spsquared
changed the title
UART doesn't seem to work
Brick-to-brick UART doesn't seem to work
May 12, 2022
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:
Brick 2:
init();
simply setsbrick1
andbrick2
to the UART file descriptors and starts theuart_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:
fscanf
appears to wait for an input from the other end that will match the formatting inputted.fprintf
can do escape codes but PuTTY cannotNew code:
Brick 1:
Brick 2:
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.
The text was updated successfully, but these errors were encountered: