LaserWeb4 icon indicating copy to clipboard operation
LaserWeb4 copied to clipboard

No supported firmware detected. Closing port

Open mkeyno opened this issue 8 years ago • 79 comments
trafficstars

I run laserweb4 rev 4.0.728 with GRBL 1.1f how ever same as this issue ,it disconnected to the machine , both part set to 115200baud and my board simply connected to other CAM software

 Server error: Opening COM11: Unknown error code 121
 Machine disconnected
 Connecting Machine @ USB,COM11,115200baud
 Machine connected
 No supported firmware detected. Closing port COM11
 Machine disconnected

mkeyno avatar May 24 '17 05:05 mkeyno

@cprezzi https://github.com/EmergingTechnologyAdvisors/node-serialport/issues/333 ??

jorgerobles avatar May 24 '17 08:05 jorgerobles

@mkeyno We need the boards welcome string for compatibillity check and selecting the correct firmware protocol. If this string is not received within 2s, we disconnect.

Please try this:

  • Open the Arduino IDE
  • Seletct the same port you used with LW4
  • Open the serial monitor
  • You should see the welcome string Grbl 1.1f ['$' for help] after 1-2s (without sending something!)

cprezzi avatar May 24 '17 09:05 cprezzi

If you also don't get the welcome message with the serial monitor, then you are either on the wrong port or there is some other problem. You could then try to change the COM port number to something lower (1-6) via Windows Device Manager. You need to disconnect and reconnect the USB cable after that.

cprezzi avatar May 24 '17 09:05 cprezzi

thanks @cprezzi , but as mentioned its already work with other CAM software terminal and my GRBL board correctly send the Grbl 1.1f ['$' for help] , maybe it should extend the time or in this case send reset command 0x8 to be sure capture the welcome message , however I might add I use the Bluetooth serial bridge and it may probably take longer time regard to wire connection

mkeyno avatar May 24 '17 12:05 mkeyno

It doesn't matter if it works with other gcode sender or CAM as they probably don't rely on the welcome message. The test with the Arduino IDE would help me to analyze the problem.

What exactly is this bluetooth serial bridge? The Arduino only sends the welcome message, if it is connected via USB, not via serial pins (rx/tx)!

It's also possible that it just takes a bit too long until we get the message. In this case, I could probably make the timeout configurable via an environment variable.

cprezzi avatar May 24 '17 12:05 cprezzi

thanks @cprezzi , yes it work on Arduino IDE as well , and BT serial bridge is pretty normal today's, I use HC-06 to to control my cnc machine or other wireless serial communication projects , it's just need to connect rxtx pins , however as you mentioned , environment parameters should changed according to extend timeout , can you tell me where the proper variable is ?

mkeyno avatar May 24 '17 13:05 mkeyno

Bt bridge doesnt autoreset like usb does. Hit reset button on arduino and connect in lw at same time. Grbl spits welcome string out when usb port opens, pulling dtr low, resetting arduino. Bt doesnt do that

ghost avatar May 24 '17 13:05 ghost

@mkeyno You realy MUST be EXACT if you like to get support. Do you realy get the welcome message when connecting with the serial monitor of the Arduino IDE WITHOUT sending anything? I don't think so (see Peters post).

cprezzi avatar May 24 '17 16:05 cprezzi

@cprezzi yes , it is show the welcoming message as it expected but as the @openhardwarecoza truly mentioned its due to lack of autoreset like usb and its handshaking longer than wire serial , and I think if the waiting time extended its easily solve the problem , but this version is in binary and I don't know how to change the time

mkeyno avatar May 24 '17 17:05 mkeyno

The next binary will read the FIRMWARE_WAIT_TIME from an environment variable so you can place a .env file to the installation folder with FIRMWARE_WAIT_TIME=10 to extend the timeout to 10s.

cprezzi avatar May 26 '17 09:05 cprezzi

Did you know that you can also reset the board by pressing CTRL-x in LaserWeb?

cprezzi avatar May 26 '17 09:05 cprezzi

thanks very much @cprezzi , yes I know that , however it must first connect to COM at first , also I find .env file in my laserweb3 installation folder but not such things in laserweb4 , I hope it will be ready soon

mkeyno avatar May 26 '17 16:05 mkeyno

It will be comming with the next binary version. There will be no .env file created automatically. You have to create a text-file in the LW4 installation folder with the line FIRMWARE_WAIT_TIME=10 and name it .env. You can also set the wait time to 0 to disable it completely.

cprezzi avatar May 26 '17 19:05 cprezzi

That is a great feature @cprezzi Any other items going to be user settable in that file?

funinthefalls avatar May 27 '17 03:05 funinthefalls

I agree if this variable extended , such as engraving setting for the specific firmware , and special setting for setup the firmware , for example special tab page display the command,variables and description need to setup specific firmware

mkeyno avatar May 27 '17 20:05 mkeyno

hi @cprezzi , is v4.0.733-79 version has the mentioned feature ?

mkeyno avatar Jun 04 '17 07:06 mkeyno

Yes, ...-79 has the FIRMWARE_WAIT_TIME feature.

cprezzi avatar Jun 04 '17 10:06 cprezzi

@funinthefalls All available params of the ".env" file are:

  • WEB_PORT={IP port of server} //default: 8000
  • VERBOSE_LEVEL={0..3} //default: 1
  • LOG_LEVEL={0..3} //default: 0
  • DRO_DECIMALS={0..4} //default: 2
  • RESET_ON_CONNECT={0..1] //default: 0
  • FIRMWARE_WAIT_TIME={0..x} //default: 10
  • GRBL_WAIT_TIME={1..x} //default: 1
  • SMOOTHIE_WAIT_TIME={1..x} //default: 1
  • TINYG_WAIT_TIME={1..x} //default: 1

cprezzi avatar Jun 04 '17 10:06 cprezzi

@cprezzi its connected only for 10 seconds (as it set) , unless reset the board manually , is there any way to set the .env parameter so it not wait for welcoming message because hardware work fine when it connected by serial connection log

onnecting Machine @ USB,COM11,115200baud
 Machine connected
 
 No supported firmware detected. Closing port COM11
 Machine disconnected


Connecting Machine @ USB,COM19,115200baud
 Machine connected
 No supported firmware detected. Closing port COM19
 Machine disconnected
 Connecting Machine @ USB,COM19,115200baud
 Machine connected
 No supported firmware detected. Closing port COM19
 Machine disconnected
 Connecting Machine @ USB,COM19,115200baud
 Machine connected
 
 Firmware grbl 1.1f detected
 [MSG:'$H'|'$X' to unlock]
 Work Offset: 0.00 / 0.00 / 0.00 / NaN
 Work Offset: 269.94 / 59.13 / 6.00 / NaN
 Work Offset: 0.00 / 0.00 / 0.00 / NaN

mkeyno avatar Jun 05 '17 17:06 mkeyno

@mkeyno Disabling the timeout would not help as the server needs the welcome string to select the right firmware protocoll. You only get this problem, because you use the bluetooth bridge. You should consider to connect directly by USB (or live with manual reset).

cprezzi avatar Jun 05 '17 21:06 cprezzi

@cprezzi can you add another optional parameter such as COMMAND_ON_CONNECT so it could send the reset command to get the welcome message ?

mkeyno avatar Jun 08 '17 04:06 mkeyno

@mkeyno Ok, I have added a new environment variable 'RESET_ON_CONNECT'. The server sends a ctrl-x (reset) command to the board, if this variable is set to 1.

This feature will be available with backend version 4.0.96.

cprezzi avatar Jun 08 '17 14:06 cprezzi

you are my man , thanks @cprezzi

mkeyno avatar Jun 08 '17 15:06 mkeyno

@cprezzi I'm curious about how & where to add these env parameters in source , actually I intend to test some specific parameters , can you give me some clue how to rebuilt the source and create the binary program

mkeyno avatar Jun 08 '17 17:06 mkeyno

@mkeyno Uhh, that is a lot to explain! It's a whole chain of requirements you have to fulfill (git, node.js with npm, multiple git repositories...). If you are an experienced developer, start by reading https://github.com/LaserWeb/LaserWeb4/wiki/How-to-Contribute. After you have forked and cloned LaserWeb4 to your local machine, you need to run 'npm run installdev' to get all the dependencies installed. You also need to fork and clone the lw.comm-server repo to add/change something on the server side (like the env variables). The process to compile the electron installer is basically explained in the electron_bundler branch of lw.comm-server.

cprezzi avatar Jun 08 '17 18:06 cprezzi

The whole server code is in the server.js file of the lw.comm-server repo. config.js is where compile params and environment variables are defined.

cprezzi avatar Jun 08 '17 19:06 cprezzi

But the environment variables are no long-term solution. They will probably be replaced in some time with machine settings in the frontend.

cprezzi avatar Jun 08 '17 19:06 cprezzi

@cprezzi actually I did and tried to install it on my machine but I'd not be sure whether this ticket be suitable for such matter , caz it seems I miss couple of libs which is not fully addressed in the https://github.com/LaserWeb/LaserWeb4/wiki/How-to-Contribute page, kindly let me know if there is special ticket for discuss about that

mkeyno avatar Jun 08 '17 20:06 mkeyno

I'm experiencing the same problem with Laserweb 4.0.735 and Grbl 1.1f. Running on OSX 10.12.5. Any new infos about the issue?

I tried the .env file, but it seems not to work the same way for OSX (I made a file LaserWeb.env that lives in the same folder as the app)

gerwinbrunner avatar Jul 03 '17 17:07 gerwinbrunner

Here is the console output:

screen shot 2017-07-03 at 19 15 56 screen shot 2017-07-03 at 19 17 14

gerwinbrunner avatar Jul 03 '17 17:07 gerwinbrunner