I already installed Octoprint, and it works fine as a 3D printer controller. But I wish I could also use this CNCjs thing for whenever I’m using the machine as a CNC.
Is it possible to use both? If yes, any idea how?
It is surely a pretty stupid question, but I’m a total moron when it comes to using linux.
I haven’t tried installing both at the same time, I don’t see why you wouldn’t be able to. You might just not be able to run the startup script for both. I’d image you would need to run one or the other due to the limitation of only one program being able to listen / communicate over the serial port. What you could do, is install the desktop gui and put desktop icons to launch either one if you have a monitor near by.
Per jeffeb3’s comment, it sounds like you can just run both on boot. If for some reason that doesn’t work.
To make a desktop (works with Ubuntu desktop, is inagine it works with other Linux distributions). Create a file on the desktop with a .desktop extension and add the following code. Replace the script path on the ‘Exec=‘ line for the command you want to run. You can optionally add an icon if you’d like. Otherwise I’m pretty sure you can just remove it. My code formatting might be a little off since I’m writing this from my phone. That should run the code.
if to want to run a browser you can do so by installing chromium and adding a few more bits to this script ( might get in trouble for a self plug ) but I wrote a blog post on it for pretty much exactly this here. Again that was for a Ubuntu but should, in theory, work the same on other distributions of Linux
Start with something simple, such as: are you even able to get a putty connection to that raspberry pi from your PC? The IP address should be something of the form: 192.168.x.z
root@cnc:~ # sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000 iptables v1.6.0: can’t initialize iptables table `nat’: Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
BTW, I see that octpi uses this to create their images:
I’ve been thinking it might be cool to make a cnc image with cnc.js, octoprint, and the wifi setup page thing. I can’t remember what the wifi setup page thing is, but it would be good for us to have it start with an ad hoc wifi connection and a landing page to get to octoprint and cnc.js, because some people don’t have access to wifi where their machine is. Anyone want to work on this with me? Any other requests?
Jeff - thanks - I do think if CNCjs is a good tool to use for MPCNC or LowRider then the instruction should be straight forward. An image would be most ideal in my opinion. Not sure how many people would use it but I’d be all for it because 3 to 7 attempts to install is just crazy.
Copy and paste (right-click) the following commands into the terminal (via Putty):
# Iptables (allow access to port 8000 from port 80)
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000
# Make Iptables Persistent
sudo apt-get install iptables-persistent -y
However, if I run the ip : 8000 now it pulls up CNCjs
Yeah, something simple is going wrong. Don’t get discouraged. The image I bwasbtalking about probably wont be done for a while, so I would still try to fix whatever simple thing that’s stopping you.
C’Mon, Kris. You know it’s a complicated system, and things don’t always work the same way. Daniel did a lot of work getting those instructions going. How about being a little grateful? You’ve been getting a lot of help in these forums.