Git Product home page Git Product logo

Comments (2)

aldenhart avatar aldenhart commented on May 23, 2024

A rough version of dual-endpoint USB has been pushed to the alden branch for testing. There are some shortcuts taken, but it should behave more or less according the description in the above wiki page. In short, use it like this:

  1. System is idle. Nothing is connected.
  2. Connect to usbserial001. This will become a ctrl+data channel
  3. Connect to usbserial003. This will become the data channel, and usbserial001 will become the control channel.
  4. Send controls (JSON) to ctrl (001) and Gcode to data (003). The reader will prioritize controls over data and always read and process the control if one is available before attempting to read the next gcode block.
  5. If data (003) disconnects the ctrl (001) reverts to being a ctrl+data channel. 003 can be re-connected as a data channel. If ctrl (001) disconnects then both channels disconnect.

That's it.

A few observations/questions:

  • There is currently no distinction at the controller (reader) level between text lines returned by the control channel and lines returned by data (gcode blocks). The controller will happily receive both and execute both. I don't think this is a problem, but people should be aware of this.
  • Any command received on either channel will send its responses to the control channel. Including received data. This may or may not be a good idea. Depends on use. Also, there is no output sent to the data channel. Feedback welcome.
  • One possible enhancement would be to send a connect message back up the channel that was was just connected or changed. So the first connect would send a message indicating ctrl+data, the second would send a message over both ports, one for data, the other for control. SImilar messages would be send for other state transitions. This is more complexity, but if it's useful we should discuss. Part of this might also be the ability to query a channel for it's capabilities and state.

from g2.

cmcgrath5035 avatar cmcgrath5035 commented on May 23, 2024

FYI, when running TinyG2 on Linux, the two ports appear as /dev/ttyADM0 and /dev/ttyADM1. I have not attempted to do anything on the /dev/ttyADM1 port as of yet.

from g2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.