Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
spsquared opened this issue May 12, 2022 · 0 comments
Open

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

spsquared opened this issue May 12, 2022 · 0 comments

Comments

@spsquared
Copy link

spsquared commented 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:
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:

  • 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:
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.

@spsquared spsquared changed the title UART doesn't seem to work Brick-to-brick UART doesn't seem to work May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant