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? - #17 by SamyKamkar 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? - #17 by SamyKamkar 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