Q: How to print over the wifi network? (mattercontrol+?+raspberry?)
-
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?
-
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"...
-
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?
-
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...
-
Sussed it. Printer is on ttyUSB0 not on ttyASM0
Still getting errors though:Attempting to connect to: 192.168.1.14 on port 2323
Connected to: 192.168.1.14 on port 2323
->Communication State: AttemptingToConnect
->N1 M110 N1*125
->N1 M110 N1*125
<-echo:Unknown command: "ÿû,ÿú,"
->Communication State: Connected
->N1 M110 N1*125
<-ok
<-echo:Unknown command: "S0"
<-ok
->N1 M110 N1*125
<-echo:Unknown command: ""
<-ok
->N2 M114*37
<-ok
<-X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
<-ok
->N1 M110 N1*125
<-ok
->N2 M115*36
<-FIRMWARE_NAME:Marlin SkyNet3D-V2.3.2 (Github) SOURCE_CODE_URL:https://github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:SkyNet3D EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
<-ok
->N3 M114*36
<-X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0
<-ok
->N4 M104 T0 S0*37
<-ok
->N5 M105*34
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N6 M105*33
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N7 M105*32
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N8 M105*47
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N9 M105*46
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N10 M105*22
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N11 M105*23
<-ok T:16.2 /0.0 B:16.4 /0.0 @:0 B@:0
->N12 M105*20
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N13 M105*21
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N14 M105*18
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N15 M105*19
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N16 M105*16
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N17 M105*17
<-Error:No Line Number with checksum, Last Line: 16
<-echo:Unknown command: "0"
<-ok
->N18 M105*30
<-echo:Unknown command: ""
<-ok
->N19 M105*31
<-Error:Line Number is not Last Line Number+1, Last Line: 16
<-Resend: 17
<-ok
->N17 M105*17
<-Error:No Line Number with checksum, Last Line: 16
<-echo:Unknown command: "0"
<-ok
->N18 M105*30
<-echo:Unknown command: ""
<-ok
->N19 M105*31
<-Error:Line Number is not Last Line Number+1, Last Line: 16
<-Resend: 17
<-ok
->N17 M105*17
->N17 M105*17
<-echo:Unknown command: ""
<-ok
->N18 M105*30
->N18 M105*30
<-echo:Unknown command: ""
<-ok
->N19 M105*31
<-Error:Line Number is not Last Line Number+1, Last Line: 16
<-Resend: 17
<-ok
->N17 M105*17
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N18 M105*30
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N19 M105*31
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N20 M105*21
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N21 M105*20
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N22 M105*23
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N23 M105*22
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N24 M105*17
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N25 M105*16
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N26 M105*19
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N27 M105*18
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N28 M105*29
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N29 M105*28
<-ok T:16.3 /0.0 B:16.4 /0.0 @:0 B@:0
->N30 M105*20
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N31 M105*21
<-ok T:16.2 /0.0 B:16.4 /0.0 @:0 B@:0
->N32 M105*22
<-ok T:16.4 /0.0 B:16.4 /0.0 @:0 B@:0
->N33 M105*23