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

Create documentation for bridges (serial ports) #16

Closed
jmthomas opened this issue Oct 13, 2022 · 2 comments
Closed

Create documentation for bridges (serial ports) #16

jmthomas opened this issue Oct 13, 2022 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jmthomas
Copy link
Member

See BallAerospace/COSMOS#1508

@jmthomas jmthomas added the documentation Improvements or additions to documentation label Oct 13, 2022
@ryanmelt
Copy link
Member

ryanmelt commented Nov 15, 2022

Serial ports can be implemented using COSMOS bridges, or directly if you are on linux running Docker on the host (not Docker Desktop).

Direct Serial Port Solution (Linux Docker only):

Add these lines (or equivalent) to the operator service in compose.yaml

   devices:
     - "/dev/ttyUSB0:/dev/ttyUSB0"

And In a shell:
sudo chmod 666 /dev/ttyUSB0

OR

Bridge Solution:

  1. Requires a host Ruby installation (Ruby 3)
  2. set host environment variable RUBYLIB=<Path to cosmos/openc3/lib folder>
  3. set host environment variable RUBYGEMS_URL=https://rubygems.org
  4. cd cosmos/openc3 && bundle install && rake build && cd ../..
  5. ruby cosmos/openc3/bin/openc3cli bridgesetup
  6. Edit the generated bridge configuration file (change serial port settings)
  7. ruby cosmos/openc3/bin/openc3cli bridge
  8. Change your plugin to connect to be a tcpip_client_interface instead of serial_interface and point host to host.docker.internal (or 172.17.0.1) and appropriate port
  9. Install updated plugin to server

@ryanmelt
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants