samyk / easel-driver

Easel driver for Linux, Mac, Windows, ARM, Raspberry Pi, Intel, FTDI, CH340, CH341, CP210x, FTDI clones, local, and remote access to GRBL-based CNC controllers
95 stars 24 forks source link

Easel asks me to plug in the usb #1

Closed rmasci closed 4 years ago

rmasci commented 7 years ago

Hi Samy,

Great install btw! Wish more were that easy... Anyway I have easel-driver up and running on my raspberry pi 3... I am running my own setup with a protoneer board and much better stepper drivers (And 1/3rd the price of Inventables controller) Basically the arduino is on a serial port, not on a USB. Is there a way to get this to work with serial and not usb?

Thanks

Rich

samyk commented 7 years ago

Well, it should behave the same -- the Easel webpage is just trying to connect to localhost:1338. Are you running ncat to forward the connection?

rmasci commented 7 years ago

Yes. Netcat is connected, iris.js is running and listening on port 1338:

pi@xcarve:~ $ netstat -pan | grep 1338 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:1338 0.0.0.0:* LISTEN 8454/node tcp 0 0 10.1.1.122:1338 10.1.1.100:53585 ESTABLISHED 8454/node

Raspberry is 10.1.1.122, my Mac is 10.1.1.100

rmasci commented 7 years ago

If I stop the ncat, and I refresh my easel screen it tells me to install the driver, and when I start the ncat it allows me to select my machine type but tells me to plug in the USB cable and turn on the machine. I think its working but since my Raspberry pi connects to /dev/AMA0 for the arduino instead of /dev/tty.usbserialxx may be the issue. I don't know Node.js well enough to try to find out where it's looking for the serial.

samyk commented 7 years ago

Ahh, that's probably it. The Easel driver uses the node SerialPort module which is called from lib/serial_port_controller.js (also accessed from websocket_controller.js). I'd investigate those to ee if you can adjust the port it searches for (this might also be a function of the SerialPort module directly)

kdbuyser commented 6 years ago

I am also interested in this - same problem here that the driver only seems to be looking for /dev/tty.usbserialxx and ignoring /dev/ttyAMA0

tobintax commented 6 years ago

Same here...

tobintax commented 6 years ago

Found something:

https://www.npmjs.com/package/serialport#new_module_serialport--SerialPort_new

„Usage

Opening a Port var SerialPort = require('serialport'); var port = new SerialPort('/dev/tty-usbserial1', { baudRate: 57600 }); “

I think this is what we need.

tobintax commented 6 years ago

Got it working with non standard serial ports. Additionally it is working with the lastest easel driver version. Hopefully @samyk accepts the changes :-)

rmasci commented 6 years ago

Nice work!! Did you do use that other npm package that creates a USB serial port out of a standard serial port?

On Mon, Feb 5, 2018 at 3:28 PM, tobintax notifications@github.com wrote:

Got it working with non standard serial ports. Additionally it is working with the lastest easel driver version. Hopefully @samyk https://github.com/samyk accepts the changes :-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-363211122, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPZDLpL8HtEw23zllknX2kJ_knpkwks5tR2RTgaJpZM4Oy2lg .

tobintax commented 6 years ago

Which other NPM?

btw, output from my shell:

2018-02-05T20:30:31.410Z Machine [id=4] Resetting 2018-02-05T20:30:31.414Z iris.js [id=0] Listening on port 1338 for connections from easel.inventables.com:80 easel.inventables.com:443 easelstaging.inventables.com:80 easelstaging.inventables.com:443 easel.invinternal.com:443 easel-secure.inventables.com:443 easel-insecure.inventables.com:80 2018-02-05T20:30:31.415Z Machine [id=8] Resetting 2018-02-05T20:30:36.638Z Websocket Controller [id=5] Setting config: GRBL 0.9 Default Configs 2018-02-05T20:30:36.639Z Machine [id=8] Resetting 2018-02-05T20:30:36.640Z Websocket Controller [id=5] Opening port: /dev/ttyUSB0 2018-02-05T20:30:36.644Z Serial port controller [id=7] Port opened 2018-02-05T20:33:07.134Z Websocket Controller [id=5] got 2521 lines of gcode

rmasci commented 6 years ago

(Might have used the wrong term) This one you posted earlier: https://www.npmjs.com/package/serialport#new_module_serialport--SerialPort_new

On Mon, Feb 5, 2018 at 3:35 PM, tobintax notifications@github.com wrote:

Which other NPM?

btw, output from my shell:

2018-02-05T20:30:31.410Z Machine [id=4] Resetting 2018-02-05T20:30:31.414Z iris.js [id=0] Listening on port 1338 for connections from easel.inventables.com:80 easel.inventables.com:443 easelstaging.inventables.com:80 easelstaging.inventables.com:443 easel.invinternal.com:443 easel-secure.inventables.com:443 easel-insecure.inventables.com:80 2018-02-05T20:30:31.415Z Machine [id=8] Resetting 2018-02-05T20:30:36.638Z Websocket Controller [id=5] Setting config: GRBL 0.9 Default Configs 2018-02-05T20:30:36.639Z Machine [id=8] Resetting 2018-02-05T20:30:36.640Z Websocket Controller [id=5] Opening port: /dev/ttyUSB0 2018-02-05T20:30:36.644Z Serial port controller [id=7] Port opened 2018-02-05T20:33:07.134Z Websocket Controller [id=5] got 2521 lines of gcode

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-363213096, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPczbdfmKbYARXwWNiyJHVzBp5zAlks5tR2YjgaJpZM4Oy2lg .

tobintax commented 6 years ago

no, I didn't use any other packages. I just modified the serial_port_controller.js file to include the config.json.

tobintax commented 6 years ago

ok, found another (more simple) solution.

rmasci commented 6 years ago

Can you send me how to do this? I'm not understanding what you're doing... :D

On Mon, Feb 5, 2018 at 5:25 PM, tobintax notifications@github.com wrote:

ok, found another (more simple) solution.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-363242313, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPeKmvlbiGm2oVkm-iomDPmDGT5Jiks5tR3_OgaJpZM4Oy2lg .

tobintax commented 6 years ago

Please have a look at the updated readme from samy. At the end I inserted some information regarding the needed steps.

tobintax commented 6 years ago

"Auto enumeration of the right COM/USB Port"

rmasci commented 6 years ago

Cool Thanks!!

On Tue, Feb 6, 2018 at 8:37 AM, tobintax notifications@github.com wrote:

"Auto enumeration of the right COM/USB Port"

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-363424203, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPSY1WeUcC-Evx3iqEFjZ4mOXEizyks5tSFWjgaJpZM4Oy2lg .

tobintax commented 6 years ago

Does it work for you?

tobintax commented 6 years ago

Does it work for you? @rmasci

rmasci commented 6 years ago

No it didn't work for me

This is the settings I used: currentComName = comName; var thisPort = new SerialPort('/dev/ttyAMA0', { baudrate: '115200', parser: SerialPort.parsers.readline(config.separator), errorCallback: function(err){ logger.log("ERROR: " + err, Debugger.logger.RED); return; } });

I also tried with 'baudrate: config.baud;'

Thanks,

Rich

On Tue, Feb 6, 2018 at 11:11 AM, tobintax notifications@github.com wrote:

Does it work for you?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-363473053, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPfSBGyBlRkY2K6gMaX-Fd7uHOKFcks5tSHm3gaJpZM4Oy2lg .

samyk commented 6 years ago

What's the error you received @rmasci? Oh, wait, yours is on a serial port...do you know what serial port? Can you paste the output of ls /dev/tty* here?

rmasci commented 6 years ago

Hey,

The serial port is /dev/ttyAMA0 for the device I have, I've logged in and checked it by running screen: CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7 | VT102 | Offline | tty8

ok $$ $0=10 $1=25 ... and so on... ok

I have run the netcat command from my Mac and it looks to be connected to the Raspberry PI. (Mac is 10.1.1.100, xcarve is 10.1.1.25)

pi@xcarve:~ $ netstat -pan | grep 1338 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:1338 0.0.0.0:* LISTEN 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57495 ESTABLISHED 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57501 ESTABLISHED 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57497 ESTABLISHED 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57493 ESTABLISHED 524/node pi@xcarve:~ $

Thanks,

On Fri, Feb 9, 2018 at 9:31 PM, Samy Kamkar notifications@github.com wrote:

What's the error you received @rmasci https://github.com/rmasci? Oh, wait, yours is on a serial port...do you know what serial port? Can you paste the output of ls /dev/tty* here?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-364619313, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPdak9nt-v2_7znJqqNS9wpiu9xL0ks5tTP9sgaJpZM4Oy2lg .

rmasci commented 6 years ago

(Forgot to mention in my last email..) But when I go in to easel it asks me to connect the usb.

On Fri, Feb 9, 2018 at 10:01 PM, Richard Masci rmasci@gmail.com wrote:

Hey,

The serial port is /dev/ttyAMA0 for the device I have, I've logged in and checked it by running screen: CTRL-A Z for help | 115200 8N1 | NOR | Minicom 2.7 | VT102 | Offline | tty8

ok $$ $0=10 $1=25 ... and so on... ok

I have run the netcat command from my Mac and it looks to be connected to the Raspberry PI. (Mac is 10.1.1.100, xcarve is 10.1.1.25)

pi@xcarve:~ $ netstat -pan | grep 1338 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 0.0.0.0:1338 0.0.0.0:* LISTEN 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57495 ESTABLISHED 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57501 ESTABLISHED 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57497 ESTABLISHED 524/node tcp 0 0 10.1.1.25:1338 10.1.1.100:57493 ESTABLISHED 524/node pi@xcarve:~ $

Thanks,

On Fri, Feb 9, 2018 at 9:31 PM, Samy Kamkar notifications@github.com wrote:

What's the error you received @rmasci https://github.com/rmasci? Oh, wait, yours is on a serial port...do you know what serial port? Can you paste the output of ls /dev/tty* here?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-364619313, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0UPdak9nt-v2_7znJqqNS9wpiu9xL0ks5tTP9sgaJpZM4Oy2lg .

maxcom99 commented 5 years ago

Anything new on this?

gohust commented 4 years ago

Hi there. I got big big problem with driver. i make many things and still not working.

uname -a: Linux garaz 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

After run easel driver i got this:

2020-03-29T11:19:57.460Z iris.js [id=0] Starting Easel Driver 0.3.18 2020-03-29T11:19:57.467Z Machine [id=3] Resetting 2020-03-29T11:19:57.491Z iris.js [id=0] Listening on port 1438 for secure connections from easel.inventables.com:80 easel.inventables.com:443 easelstaging.inventables.com:80 easelstaging.inventables.com:443 easel.invinternal.com:443 easel-secure.inventables.com:443 easel-insecure.inventables.com:80 2020-03-29T11:19:57.495Z iris.js [id=0] Listening on port 1338 for connections from easel.inventables.com:80 easel.inventables.com:443 easelstaging.inventables.com:80 easelstaging.inventables.com:443 easel.invinternal.com:443 easel-secure.inventables.com:443 easel-insecure.inventables.com:80 2020-03-29T11:19:57.773Z Websocket Controller [id=4] Client connected via polling 2020-03-29T11:19:58.072Z Websocket Controller [id=4] Client transport changed to websocket

i Make change port , install , reinstall, chown /dev/ttyUSB0, adding to group dialout , edit serial_port_controler.js and nothing. Still: Connecting to X-Carve…

Plug in your USB cable and turn on the machine.

Pls Help

ps. In Universal G-code Sender works good

rmasci commented 4 years ago

I just happen to be using this today :) I tried all sorts of things to get it to work with /dev/ttyUSB0 -- I gave up on it. What I did was buy the XCarve controller, that connected as /dev/ttyAMA0 and it works just fine. This is frustrating as I had spent probably about $80 to build my own using an arduino, and some better motor drivers and it all worked great using regular gcode sending, but I couldn't figure out how to get USB0 using the default driver from XCarve. I am a coder, but not a javascript coder and I even tried jumping in and editing their code -- all of my attempts failed, and I even hard coded it to /dev/USB0. So I purchased the xcarve controller for what I thought was way too much and it works nicely.

Even asked XCarve to build in to their driver the option to select.. Now that being since I purchased the xcontroller from xcarve they've released a linux driver for easel. Perhaps it's as simple as installing that package -- however that package is built for an x86 64 bit system, so you'd have to take the debian package they supply for ubuntu based and repackage it for raspberry pi... The code it's self is javacode and should run using the raspberry pi nodejs.

On Sun, Mar 29, 2020 at 4:31 PM gohust notifications@github.com wrote:

Hi there. I got big big problem with driver. i make many things and still not working.

uname -a: Linux garaz 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

After run easel driver i got this:

2020-03-29T11:19:57.460Z iris.js [id=0] Starting Easel Driver 0.3.18 2020-03-29T11:19:57.467Z Machine [id=3] Resetting 2020-03-29T11:19:57.491Z iris.js [id=0] Listening on port 1438 for secure connections from easel.inventables.com:80 easel.inventables.com:443 easelstaging.inventables.com:80 easelstaging.inventables.com:443 easel.invinternal.com:443 easel-secure.inventables.com:443 easel-insecure.inventables.com:80 2020-03-29T11:19:57.495Z iris.js [id=0] Listening on port 1338 for connections from easel.inventables.com:80 easel.inventables.com:443 easelstaging.inventables.com:80 easelstaging.inventables.com:443 easel.invinternal.com:443 easel-secure.inventables.com:443 easel-insecure.inventables.com:80 2020-03-29T11:19:57.773Z Websocket Controller [id=4] Client connected via polling 2020-03-29T11:19:58.072Z Websocket Controller [id=4] Client transport changed to websocket

i Make change port , install , reinstall, chown /dev/ttyUSB0, adding to group dialout , edit serial_port_controler.js and nothing. Still: Connecting to X-Carve…

Plug in your USB cable and turn on the machine.

Pls Help

ps. In Universal G-code Sender works good

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/samyk/easel-driver/issues/1#issuecomment-605696385, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGRIPMRSHN4OWXDQH6D7PDRJ6VZHANCNFSM4DWLNFQA .

samyk commented 4 years ago

@gohust are you running the web interface from the same machine or a different machine?

gohust commented 4 years ago

I run web from the same machine.

samyk commented 4 years ago

@gohust use the browser's Developer Tools and go to the "Network" tab. See where it's connecting and any requests/replies...save that if you can and share so we can see what it's doing. Looks like it's connecting but I haven't used X-Carve so not sure at what point it's erroring.

You could also try grep ~/easel-driver -re usbserial and find all occurrences and adjust to /dev/ttyUSB0 -- though it looks like from the source that the serial port name should come from the websocket from the browser, so I'd suggest looking at browser settings and if any of the traffic sends an init_port message as I believe you can set the port from that.

gohust commented 4 years ago

Ty for reply samyk. What exacly you need to paste here from Developer Tools ?

hugo@garaz:~/easel-driver-master$ grep -re usbser

easel-driver/IrisLib-0.3.18.pkg/node_modules/@serialport/parser-byte-length/byte-length.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/IrisLib-0.3.18.pkg/node_modules/@serialport/parser-readline/readline.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/IrisLib-0.3.18.pkg/node_modules/@serialport/parser-delimiter/delimiter.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/IrisLib-0.3.18.pkg/node_modules/@serialport/parser-ready/ready.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/IrisLib-0.3.18.pkg/node_modules/@serialport/parser-regex/regex.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/node_modules/@serialport/parser-byte-length/byte-length.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/node_modules/@serialport/parser-readline/readline.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/node_modules/@serialport/parser-delimiter/delimiter.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/node_modules/@serialport/parser-ready/ready.js:const port = new SerialPort('/dev/tty-usbserial1') easel-driver/node_modules/@serialport/parser-regex/regex.js:const port = new SerialPort('/dev/tty-usbserial1')

BjarneJensen commented 4 years ago

Hi I have the same Issue but have also had some success with universal gcode sender. I think I am in the same boat as gohust. My console on pi and windows chromium is something like.

Failed to load resource: net::ERR_CONNECTION_REFUSED inventableslocalhost.com:1438/socket.io/?EIO=3&transport=polling&t=N5IU29w:1 Failed to load resource: net::ERR_CONNECTION_REFUSED inventableslocalhost.com:1438/socket.io/?EIO=3&transport=polling&t=N5IU46w:1 Failed to load resource: net::ERR_CONNECTION_REFUSED inventableslocalhost.com:1438/socket.io/?EIO=3&transport=polling&t=N5IU63x:1 Failed to load resource: net::ERR_CONNECTION_REFUSED inventableslocalhost.com:1438/socket.io/?EIO=3&transport=polling&t=N5IU80x:1 Failed to load resource: net::ERR_CONNECTION_REFUSED vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1798 GET https://inventableslocalhost.com:1438/socket.io/?EIO=3&transport=polling&t=N5IU9kT net::ERR_CONNECTION_REFUSED g.create @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1798 g @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1793 b.request @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1794 b.doPoll @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1795 k.poll @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1802 k.doOpen @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1801 k.open @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1806 k.open @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1778 k @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1775 k @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1770 k.open.k.connect @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1763 (anonymous) @ vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1769 vendor-046105948a0ec3bdf7c2e971912a23e7a196c381f8a9011230dc27d3db9d569c.js:1798 GET https://inventableslocalhost.com:1438/socket.io/?EIO=3&transport=polling&t=N5IUBS0

Not sure if it could be my firewall/router settings. hoping to not have to go down that black hole. Appreciate any help. Running latest raspbian buster and sainsmart 3018.

samyk commented 4 years ago

I've made some improvements that allows Easel to support some other USB serial chips such as the CH340s. Can you try the latest version and see if that resolves it? Re-open if you still have issues.

Thanks!