Inventables Community Forum

Running Easel on Raspberry Pi

I want to be able to run the two Carvey machines we have in my High School Prototype Lab without the need to have a full blown laptop or desktop computer connected to them. Could anyone help me figure out how to make a raspberry Pi work for controlling the machines.?

I would recommend checking this post Easel Local for Linux? of all the ways to make easel local work it was a much easier solution.

1 Like

I built a Raspberry Pi Controller for my machine.
You can check my thread on this site and also I have put the first video on youtube (search Ryan Ballard Raspberry Pi and you will find it.)

1 Like

Ha ha ha ha bob…

I have this up and running right now. I use my PI for a lot of different things, one of which is the computer I use for controlling the XCarve. First thing I did to the Raspbian desktop image was install xrtp this enables the pi to be logged in using Microsoft RDP or remote desktop protocol Second, and I didn’t write this but found it and it works, use Sammy Kamkar’s solution. Log in to the pi, run the easel-driver.sh and your pi is setup with the driver.

From here you can remote in to your pi desktop and use easel from the raspbian browser chromium that comes with the raspbian desktop.

Hi guys I’ve recently set up my Raspberry Pi 4+ however I’m trying to run my cnc 3018 off the Pi via usb lead into the Pi from the machine. When I’m on Easel it and setting machine settings up it asks me to down Linux, windows or Mac driver so I download the Linux on my Pi open it and when it’s extracting the files i get a error message can anyone help me?

@AlexBirkett welcome to the forum.

Have you tried to setup the driver as listed in this post Easel Local for Linux? as stated above.

when you download the Linux driver it is compiled to run on a processor that has the X86 instruction set “this is a type of processor”

when you download the mac driver is is compiled to run on a PPC instruction set “this is also a type of processor”

when you follow the directions on the post you will extract the driver source files and compile your own driver for a ARM instruction set “this is the processor used in the Raspberry Pi” only then will you be able to get it to work. “talk to your system” the process is steam lined by @SamyKamkar and he has made this very easy to do.

the Pi is a small very efficient system to use for controlling these machines and there is no fan to draw dust into the system. I use mine with a wireless keyboard and love that I can stand directly over the work piece and move the gantry to exactly where I want it.

Hi mate I’ve tried to download SamyKamkar driver but hasn’t been successful. it may be either its been patched now or as I’ve got learning difficulties I’m not understanding it right and doing something wrong… is there a video step by step actions or is there a way someone can log onto my Pi and do it for me??

1 Like

Hello Alex,
I have been struggling with my Raspberry Pi setup as well. I’m at the point where ‘screen -r easel’ does display some information. Connecting Easel via Chromium still doesn’t connect - kept asking for a USB connection

@AlexBirkett @DwayneK.Johnson can you contact me and allow me to test on your machines to see what the issue could be? I just performed a fresh install of Raspbian + the Easel driver and it worked without making any changes, but perhaps that’s because I’m using Carvey and maybe it shows up differently than the controller you’re using.

Shoot me a private message or way to chat and I’d be happy to look at your system to see what’s going on and improve the driver to automatically work.

@SamyKamkar just wanted to say thanks for all you are doing on this. I believe that you are doing a great job for a much needed driver so that we can use the Raspberry pi on these machines.

3 Likes

Thanks @KennethConnell1, and thanks for helping people as well! Also updated github yesterday to make it a little easier to run with a single copy/paste line.

Btw, are you running Carvey or X-Carve, and what controller are you using? I’d like to update the package to automate whatever inconsistency people are having but I’ve never been able to reproduce it myself so I’m guessing it’s a different USB driver for a different microcontroller that people are using.

@SamyKamkar Pretty good chance anyone not using the X-carve or Carvey is using a little 3018. Pretty sure those use a nano clone with a CH-340

2 Likes

Thanks @NeilFerreri1! I found a Nano with CH340 and compiled grbl on it. I don’t have a spare controller to test but hoping this will get me far enough.

I’ve added some debugging and notice that without any code changes to easel-driver, the driver is properly detecting /dev/ttyUSB0 and the Arduino, and it’s actually the Easel website that is refusing to “see” the controller. In fact, this is getting sent to Easel via the WebSocket:

[“ports”, [
{ comName: “/dev/ttyAMA0” },
{ comName: “/dev/ttyUSB0”,
manufacturer: “1a86”,
pnpId: “usb-1a86_USB2.0-Serial-if00-port0”,
productId: “7523”,
vendorId: “1a86”
} ]
]

So the question is why is Easel ignoring the data and saying it doesn’t see it. Maybe it expects a specific productId/vendorId/pnpID.

Does someone here have a non-X-Carve/Carvey that is working? If so, in your browser, if you:

  • click View->Developer->Developer Tools
  • click “Network” tab
  • click “WS” to limit to WebSocket traffic
  • browse to https://easel.inventables.com
  • once you see the WebSocket show up, click it
  • you should see lines like “get_ports” followed by a “ports” line, click the “ports” line
  • expand any collapsed data
  • copy and paste that data here

That will help me test what may or may not be getting parsed as “legit” data from a working controller and then be able to update the code so simulate the controller.

I found the offending code in Easel’s website itself. It’s looking for specific USB manufacturer and vendor IDs that CH340 does not respond to

(function() {
EASEL.portUtils = function() {
var b = [“Arduino”, “FTDI”];
var a = [“VID_2341”, “VID_0403”, “Arduino”];

For comparison, here’s the get_ports output of my Carvey which does match:

[“ports”, [
{ comName: “/dev/ttyAMA0” },
{ comName: “/dev/ttyUSB0”,
manufacturer: “FTDI”,
pnpId: “usb-FTDI_FT232R_USB_UART_A9048QXY-if00-port0”,
productId: “6001”,
serialNumber: “A9048QXY”,
vendorId: “0403”
}]
]

So to fix this on the easel-driver side, I think we must “spoof” the serial chip and pretend to be an FTDI chip rather than the CH340. I’ve done this by modifying ~/easel-driver/lib/serial_port_controller.js listPorts function to look like:

  var listPorts = function (callback) {
    SerialPort.list().then(
      function(ports) {
        // TODO: scope for callback?
        ports.forEach(function(part, i) {
          if (this[i].manufacturer === '1a86')
            this[i].manufacturer = 'FTDI';
          if (this[i].vendorId === '1a86')
            this[i].vendorId = '0403';
        }, ports);
        callback(ports);
      },
      function(error) {
        // TODO: catch and handle errors
        errorHandler.trigger(error);
        return null;
      }
    )
  };

@AlexBirkett or @DwayneK.Johnson - could either of you test this modification, then run node iris.js, then see if Easel works?

2 Likes

HI SamyKamkar on my Xubuntu smth go in right direction :slight_smile: after Your modification on serial_port_controler.js i got this on default usb linux driver :

2020-05-07T21:04:50.748Z Websocket Controller [id=4] Client connected via polling
2020-05-07T21:04:50.890Z Websocket Controller [id=4] Client transport changed to websocket
2020-05-07T21:05:00.304Z Machine [id=3] Setting config: GRBL 0.9 Default Configs
2020-05-07T21:05:00.304Z Machine [id=3] Resetting
2020-05-07T21:05:00.308Z Machine [id=3] Opening port: /dev/ttyUSB0
/usr/share/easel-driver/iris/lib/serial_port_controller.js:62
parser: SerialPort.parsers.readline(config.separator),
^

TypeError: SerialPort.parsers.readline is not a function
at Object.initPortWithConfigs (/usr/share/easel-driver/iris/lib/serial_port_controller.js:62:30)
at Object.initPort (/usr/share/easel-driver/iris/lib/machine.js:597:10)
at Socket.onInitPort (/usr/share/easel-driver/iris/lib/websocket_controller.js:216:13)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at /usr/share/easel-driver/iris/node_modules/socket.io/lib/socket.js:503:12
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)

@Hugo Good thing is it’s seeing the device. Are you using my easel-driver or Inventables’? I would make sure you’re using mine first just to reduce variables here.

WORK !!! that error was on Inventables driver than I download Your new driver with install modification i make change in serial_port_controler.js without change port, only listPorts function and now work !! at least :slight_smile:
now:

2020-05-07T21:37:14.923Z Websocket Controller [id=4] Client connected via polling
2020-05-07T21:37:15.215Z Websocket Controller [id=4] Client transport changed to websocket
2020-05-07T21:37:24.507Z Machine [id=3] Setting config: GRBL 0.9 Default Configs ( i got grbl 1.1h )
2020-05-07T21:37:24.507Z Machine [id=3] Resetting
2020-05-07T21:37:24.517Z Machine [id=3] Opening port: /dev/ttyUSB0
2020-05-07T21:37:24.534Z Serial port controller [id=2] Port opened

thank You SamyKamar !!

1 Like