LaserWeb / deprecated-LaserWeb1

Deprecated: use http://github.com/openhardwarecoza/LaserWeb3 instead
186 stars 45 forks source link

Laser machine doesn't work under Raspberry, ok on Windows #108

Closed lucadentella closed 8 years ago

lucadentella commented 8 years ago

Hi! I'm facing the following problem: I've a cheap, "cd-rom based" laser engraving machine, based on grbl. I'm able to use it with LaserWeb when running it on Windows but I can't control the laser under Raspberry (raspbian jessie). After having selected the correct serial port, I use the "machine control" panel to manually move it: under Windows everything is ok (please note the "now interacting..." line in the log) and in the console panel I can see the GCode commands being sent. When I try the same running LaserWeb in my Raspi, nothing happens: I can see the correct ttyUSB device but no "now interacting..." log line and no gcodes in the console...

The logs as follows, thanks!

Under Windows:

***************************************************************
*                        Notice:                              *
***************************************************************
*     Remember to update (: !!!                               *
* 1.  Run ./update.sh or git pull                             *
* 2.  or check the commit log on                              *
* https://github.com/openhardwarecoza/LaserWeb/commits/master *
***************************************************************
* Access the LaserWeb User Interface:                         *
* 1. Open Chrome                                              *
* 2. Go to :                                                  *
*    http://192.168.1.12:8000/                                   *
***************************************************************

INFO: Machine Profiles read from file
Connecting to COM7 at 9600
Connecting to COM41 at 9600
ERROR: Error connecting to webcam: connect ECONNREFUSED - Disabling Webcam Widget
Port 0 got newline from serial: <Idle,MPos:5.006,9.994,0.000,WPos:5.006,9.994,0.000>
Port 0 got newline from serial: ok
Port 0 got newline from serial: error: Unsupported statement
ERROR:  Error from machine: error: Unsupported statement
Aborted Job - safety first!
Port 0 got newline from serial: error: Bad number format
ERROR:  Error from machine: error: Bad number format
Aborted Job - safety first!
INFO: Machine Profiles read from file

Checking for Updates
INFO:  Now interacting with  COM41  running
Command Sent from Console
Port 0 got newline from serial: ok
Port 0 got newline from serial: ok
Port 0 got newline from serial: ok

Under Raspberry:

pi@raspberrypi:~/LaserWeb $ node server.js
***************************************************************
*                        Notice:                              *
***************************************************************
*     Remember to update (: !!!                               *
* 1.  Run ./update.sh or git pull                             *
* 2.  or check the commit log on                              *
* https://github.com/openhardwarecoza/LaserWeb/commits/master *
***************************************************************
* Access the LaserWeb User Interface:                         *
* 1. Open Chrome                                              *
* 2. Go to :                                                  *
*    http://127.0.1.1:8000/                                   *
***************************************************************

ERROR: Error connecting to webcam: connect ECONNREFUSED 127.0.0.1:8080 - Disabling Webcam Widget
INFO: adding /dev/ttyAMA0 because it is enabled in config.js, you may need to enable it in the os - http://www.hobbytronics.co.uk/raspberry-pi-serial-port
ERROR:  Could not connect to device: /dev/ttyAMA0
ERROR:  Could not connect to device: /dev/ttyAMA0
Connecting to /dev/ttyUSB0 at 9600
Port 1 got newline from serial: <Idle,MPos:4.013,9.994,0.000,WPos:4.013,9.994,0.000>
Port 1 got newline from serial: ok
Port 1 got newline from serial: error: Unsupported statement
ERROR:  Error from machine: error: Unsupported statement
Aborted Job - safety first!
Missing error handler on `socket`.
TypeError: Cannot read property 'port' of undefined
    at Socket.<anonymous> (/home/pi/LaserWeb/server.js:758:26)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Socket.onevent (/home/pi/LaserWeb/node_modules/socket.io/lib/socket.js:330:8)
    at Socket.onpacket (/home/pi/LaserWeb/node_modules/socket.io/lib/socket.js:290:12)
    at Client.ondecoded (/home/pi/LaserWeb/node_modules/socket.io/lib/client.js:193:14)
    at Decoder.Emitter.emit (/home/pi/LaserWeb/node_modules/socket.io/node_modules/socket.io-parser/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/home/pi/LaserWeb/node_modules/socket.io/node_modules/socket.io-parser/index.js:247:12)
    at Client.ondata (/home/pi/LaserWeb/node_modules/socket.io/lib/client.js:175:18)
    at emitOne (events.js:77:13)
Port 1 got newline from serial: error: Bad number format
ERROR:  Error from machine: error: Bad number format
Aborted Job - safety first!
INFO: Machine Profiles read from file
ghost commented 8 years ago

I am in the process of porting our Serial backend over to SPJS, which should fix this issue. Hang tight for a week or so (:

Especially Grbl manifests issues, and it appears its a problem from upstream: see https://github.com/voodootikigod/node-serialport/issues/663