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

KBox serial outputs lock up when connected to a Raspberry Pi #68

Closed
sarfata opened this issue Nov 23, 2017 · 0 comments · Fixed by #128
Closed

KBox serial outputs lock up when connected to a Raspberry Pi #68

sarfata opened this issue Nov 23, 2017 · 0 comments · Fixed by #128
Labels

Comments

@sarfata
Copy link
Owner

sarfata commented Nov 23, 2017

See discussion on mailing list:

I was able to reproduce the problem with a Raspberry Pi at home tonight and I have found a fix.

The problem is that the raspberry pi echoes back some USB packets back to KBox which other serial drivers do not do (apparently this is specific to raspberry pi). Because KBox was not reading the input, the serial port was getting stuck. Just reading and discarding incoming data fixes this.
For more details, you can read this message on the teensy forum: https://forum.pjrc.com/threads/23770-Teensy-3-0-goes-mute-when-sending-to-Raspberry-Pi?p=32304&viewfull=1#post32304

The solution is very simple, just add the following lines in the loop() function of your src/host/main.cpp file:

while (Serial.read() > 0 ) {}
@sarfata sarfata added the bug label Nov 23, 2017
sarfata added a commit that referenced this issue Feb 17, 2018
 - New USB mode active when the connection speed is set to 38400 bauds
 - In this mode all NMEA and NMEA2000 messages are repeated to USB
 - Removed KMessage/KMessageNMEAVisitor - they are not needed anymore
 - Make sure we read data from serial port in that mode to avoid the
   serial port locking up on Raspberry Pi (closes #68)
 - Also convert SerialK data to NMEA and output it (this provides an
   output for internal sensors but may result in duplicated data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant