Q: How to print over the wifi network? (mattercontrol+?+raspberry?)



  • I'd like to not have my (OSX) laptop stuffed in the corner of the garage USB tethered to the (Rostock Max v2) printer. I've got a raspberry pi, and the even cheaper C.H.I.P. computer. Both have built-in USB and WiFi. Question: How do I "proxy" to the printer over wifi? I'm fine not slicing on the raspberry or CHIP, I realize it takes a lot of ram. But I do like everything the MatterControl software gives me - temperature, software-based 7 point leveling, etc.

    So - has anyone been able to cut the cord? I hear octoprint is nice, but then do I lose all the nice mattercontrol perks?


  • MatterHackers

    Hi Ben,

    @unlimitedbacon and I have actually been working on a solution to this and working on integrating it into MatterControl(MC). We have a working prototype using a esp8266 with this firmware currently. I hope to finish integrating this function into MC at the end of this next week however it will not be shipped until Version 1.6 is released. If you want an experimental build when it is ready you can email us at support@matterhackers.com.


    If you are so inclined you could also use com0com to create a virtual com port for MC to connect to that then connects to a program you write that patches it over to whatever you have connected to your printer (This is how I made a proof of concept before working on integrating it into MC)

    As for OctoPrint I don't personally have experience with it but I am fairly certain it used it's own slicing engine. It may however be able to print directly from Gcode allowing you to slice on MC then use OctoPrint to communicate. (There is a checkbox to maintain the software level in the Gcode export)



  • Fantastic! I can wait until 1.6.

    I'd also be very happy to use the Raspberry Pi or C.H.I.P. to do it, right now they are gathering dust. And the CHIP is less than the esp8266 (but more lead time), and has a nice USB port on it.

    @mmoening said:

    MatterControl


  • In addition to slicing on the pi with OctoPrint plus a Cura plug in, you can upload already sliced gcode over wifi and have OctoPrint manage the printing process. OctoPrint also has an API that allows posting a sliced gcode file directly from an app. I think slic3r has implemented this, and I think there is a 3rd party solution for Cura to do this, but it might not be current.

    I like MatterControl better than Cura, it would be nice to be able to push a file directly from MatterControl without having to explicitly upload via a web browser.


  • MatterHackers

    Hey Ben,

    I wanted to give you an update on how its going. That being said I have good news and bad news...

    Good new, It is now feature complete(On the side of MatterControl)!

    Bad news, It will not be in 1.6. To be more specific we need to hammer out how the connect will go on the side of the connector (be it a pi, chip or esp8266) and get some documentation on how to get that set up and ready to go.


    That being said if you would be willing to give it a test and get something set up on the pi or the chip send us an email at support@matterhackers.com and I'll get you a expiremental build for it as well as I can.



  • will it be possible to port this to the pi, so I can use this with my pi3 and touch screen, I do love matter control but I'm moving house and the printer and pc won't be close


  • Moderator

    We have actually been testing MC on the Pi with touchscreen. There are some kinks that still need to be worked out, but you are welcome to try it for yourself. There is a little more info on the wiki.

    http://wiki.mattercontrol.com/Development/Running_...


  • MatterHackers

    Good News Everyone!

    This feature is now in MC experimental so you can give it a test!

    Here is an example script to get a raspberry pi as your server

    #!/bin/bash
    stty -F /dev/ttyACM0 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
    nc -k -v -l 2323 > /dev/ttyACM0 < /dev/ttyACM0
    


  • How are the experiments going?
    I've got the printer working fine under MatterControl, but I'm having difficulties with octoprint so I'd like to give this a try. Bit of a newbie on all counts though: I can make no sense of your script (though I do at least think I know what to do with it).


  • Moderator

    The networking function is now no longer experimental and was released in MatterControl 1.7. To enable it go to Settings > Printer > Features > and check Networked Printing. Then go to Settings > Printer > Connection and enter the IP Address and Port of the device you want to connect to.

    Here is how @mmoenning's, script works. Essentially this whole script sets up your Pi to act as a relay between your printer's serial port and the network.

    stty -F /dev/ttyACM0 cs8 115200 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts
    

    This line sets up the connection to the serial port. Most of the options here you don't have to worry about, however you might need to change 115200 if your printer uses a different baud rate (like 250000). You also might need to choose a different serial port device if you have more than one printer connected. For instance, /dev/ttyACM1. Some printers also use a different style of device name, like /dev/ttyUSB0.

    nc -k -v -l 2323 > /dev/ttyACM0 < /dev/ttyACM0
    

    This line uses a program called netcat to setup a persistent TCP server on port 2323. It then directs all communication to/from the server to the serial port.

    Once the server is running, set MatterControl to connect to the IP Address of your Pi and port 2323.



  • This post is deleted!


  • OK, yesterday I had it working, but today it is throwing loads of "Wrong checksum", "Format error" and "resend" messages and basically won't print...



  • Also getting a lot of stuff like "stty: /dev/ttyUSB0: Inappropriate ioctl for device" on the Pi. Sorry, that's going a bit off topic: should I take this problem elsewhere?


  • Moderator

    It's fine, I'm just not sure I can help you much more. That script is kind of a hack. I do know that if you try to use 250000 baud you sometimes get that ioctl error. This is because it is a "nonstandard" baud rate.

    For what it's worth, we are currently developing a cheap WiFi module that you will be able to plug into your printer to put it on the network. Testing is going well, so these should go on sale Soon™. Right now the name for this device is going to be MatterControl Connect.



  • I'm inclined to stick with this and get it working rather than getting more hardware, but good luck with that project.

    I'm running it at 115200 baud.

    The "Inappropriate ioctl" problem appears to go away if I reboot the Pi (or I may have just got lucky). Comes back if I interrupt it and reissue the command, or it did last time anyway...

    Just the problem with the "resend", "format error" and "wrong checksum"...


  • Moderator

    We'd have to look at a terminal log to see what is going on.



  • Would you like me to get one for you?
    Are we assuming that the problem is not unique to me? Or would it be better if I start again with a fresh Pi to ensure everything is right at that end of it?


  • Moderator

    Since you mentioned that it was working at first, and then stopped, it seems like something must have changed. I agree it would be a good idea to try with a fresh Pi. If that doesn't work then we will need the terminal log to do any further troubleshooting.



  • Doesn't time fly?

    I set up a Pi with a fresh install of Octoprint and I cannot get the damn thing to connect to the WiFi. :roll:

    You may have guessed that it is not high on my priority list, but I don't know whether to persevere with the Octopi and get that to work, or to start afresh with a clean NOOBS, or to go back to the one that was nearly working. :?



  • Right new OS on the Pi.

    When I run the script I get either:

    stty: /dev/ttyACM0: No such file or directory

    Or:

    stty: /dev/ttyACM0: Inappropriate ioctl for device

    Either way, it goes on to:

    Listening on [0.0.0.0] (family 0, port 2323)

    And then appears able to connect. MC appears to connect when told to, but is not getting any telemetry: temperatures at zero and not responsive to commands...



Looks like your connection to MatterHackers Community was lost, please wait while we try to reconnect.