1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Printing over USB cable with Robo3D R2

Discussion in 'General Questions' started by OBradley, Aug 24, 2017.

  1. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    I suppose I'll have to put a Raspberry Pi Zero W inside, route that internal Type B cable over to it (the Zero will report as a serial gadget over USB and be powered up via USB the same way). And then... I guess I could do something using ssh pass-through or something over to the Raspi3. Dunno.
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    The correct approach would be more effort (but, way cooler) and write a driver for the Pi to emulate a printer via the USB.
    Then have it pass the Gcode onto the controller board (also connected via USB).
     
  3. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    I was looking into doing that this weekend. But if nobody else has it then why bother, right? (meh)
     
  4. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    Weird, what is it connected to?

    Guess someone made a a mistake indeed.
     
  5. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    It is an interesting programming project that I would consider when time permits (not today, not tomorrow, next week not looking so good either) :) Just as a programming exercise.
     
  6. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    Pictures or it never happened.
     
    mark tomlinson and Kilrah like this.
  7. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    It's using up one of the Raspi3's USB ports. The Raspi3 definitely doesn't respond to the Plug-and-Play handshake as a serial device. The early design on this was probably a little... optimistic.

    They (Raspberry Pi Foundation) changed things up with the Raspi Zero, I'm guessing. Out-of-box, it will respond as a serial device with P&P (confirmed) if not otherwise powered. Unfortunately, the Raspi3 has a USB hub on board, meaning that it can't be a gadget. That said, I should be able to hookup a slave Pi Zero and make magic happen.

    And in case anybody (@OBradley) missed that subtlety, this means that neither the Robo C2 nor the R2 can be seen by a computer as a serial device unless you bypass the Raspi inside and talk straight to the Robo board.
     
    #27 OutsourcedGuru, Aug 28, 2017
    Last edited: Aug 28, 2017
  8. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    If only I were at home. (Faking work, at the moment.)
     
  9. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    In this specific instance the Pi is really the computer and that is what (well, pretty sure that is what) Robo intended.
    So it is like a PC in that regard and not expecting to be directly "printed" to.
    However a quick "google" shows lots of examples for streaming the GCode FROM a Pi and that leaves just streaming GCode TO the Pi as the point. Not a huge deal you could do it with Python* even :)



    *not that I would, but you COULD.
     
  10. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    The problem of the non-existent USB "device" port is what's stopping it. There isn't one on a Pi so anything you could do would not make it appear as a standard serial printer.

    If that was to become a feature the easiest would be an external switch/mux for the USB data lines that would be controlled by the Pi to route the signals going the control board either to the Pi or to the port at the back.
     
  11. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
  12. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    You could (on the Pi) add a daughtercard to implement it.
     
  13. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    Umm that page says exactly the same as I do, you can't do it without the appropriate hardware.
     
  14. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    Which is why I mentioned an added card. You need a second USB controller...

    edit: and all of that (hardware and software) just to make it look like a serial printer :)
    Totally not worth it. Be better off just unplugging the Pi and plugging directly into the Control board (A La the R1 series).
     
    #34 mark tomlinson, Aug 28, 2017
    Last edited: Aug 28, 2017
  15. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    A USB networking cable actually has the controller in the cable itself.

    The Raspi Zero has USB On-the-Go which allows it to be either host/device side, for what it's worth.
     
  16. Kilrah

    Kilrah Well-Known Member

    Joined:
    Apr 18, 2017
    Messages:
    498
    Likes Received:
    332
    Yep. All that effort to go back to what everybody wants to avoid, a printer that depends on a generic PC. Even when I started 3D printing 3 years ago it was all about avoiding that and always recommending printers that could run independently from an SD card. Upgraded mine very quickly after a couple of failed prints due to software crashes, having to reboot my PC or such.

    Octoprint is reliable and built-in, why would you not use it?
     
  17. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    You make some fine points, @Kilrah, "why mess with perfection?" Granted, it's an awesome concept and I'm lucky that my C2 seems to be a happy camper. I'm excited about the possibilities. I'm an inventor, a coder, a tweaker, an open-sourcer, a blogger.

    Why would I add a J.A.R.V.I.S. interface so that I can talk to the thing like Tony Stark did in Iron Man? Because it would be geeky and cool. Granted, I would waste a fair amount of time on this particular distraction but I'm usually distracted so that's alright.

    I envision a future in which a person could come home and their appliances would welcome then back, say, with theme-based banter.

    Back to the original thought, why might you want a PC-to-PC level of connection between your workstation and the Raspi inside? There are consumers out there, believe it or not, who have no idea what ssh is. They wouldn't know how to vnc into a Raspi. Sure, OctoPrint is a web interface that dishes up very specific information into the printing side of things but that's where it usually stops. Can you backup/restore the Pi's image from there? Probably not. With a DCC over USB that might be a possibility.
     
    #37 OutsourcedGuru, Aug 28, 2017
    Last edited: Aug 28, 2017
  18. WheresWaldo

    WheresWaldo Volunteer ( ͠° ͟ʖ ͡°)
    Staff Member

    Joined:
    Feb 18, 2015
    Messages:
    5,905
    Likes Received:
    3,593
    This explains a lot
    coder!?

    I was a Product Manager and had to manage a group of you ... its almost as hard as herding cats.
     
    Geof likes this.
  19. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    I am offended. Managing me is way harder than herding dumb cats.
     
    Geof likes this.
  20. OutsourcedGuru

    OutsourcedGuru Active Member

    Joined:
    Jun 3, 2017
    Messages:
    752
    Likes Received:
    141
    Good thing I didn't include speller in that list. ha

    A very wise man once said that coders were like bees. You provide them a source of food and water and you get out of their way. They make honey without being asked to.

    (My nifty Microsoft Bluetooth keyboard wants batteries today, btw.)

    I made this, btw. It made sinful amounts of money.
     
    #40 OutsourcedGuru, Aug 28, 2017
    Last edited: Aug 28, 2017

Share This Page