Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

EzGraver on Raspberry Pi 3 running raspbian #41

Open
lucasvieites opened this issue Dec 28, 2017 · 9 comments
Open

EzGraver on Raspberry Pi 3 running raspbian #41

lucasvieites opened this issue Dec 28, 2017 · 9 comments

Comments

@lucasvieites
Copy link

Hi all,
I have compiled and installed EzGraver on my Raspberry Pi 3 with raspian (same instructions as for Ubuntu) and am just one step away from engraving.
I have been able to connect to my DK-8-KZ and do all the motions: up, down, left, right, center. I can also upload an image successfully, but when I press the Start button it only does a "preview" round and then seems to send just 1 byte (I see a quick flare of more intense light at the beginning of the drawing) and stops.

Any idea of what can be happening?
Regards,
Lucas

@lmftiv
Copy link

lmftiv commented Dec 30, 2017

EzGraver doesn't yet work with new (2017) version 3 lasers. There is something wrong with the image transfer.

@lucasvieites
Copy link
Author

I've read about this and gave it a try on my raspberry pi because it worked perfectly on my Fedora 26 laptop. I was hoping to get the insight of all the other people who have been using the software but this can wait until the main issues are fixed.
Thanks

@camrein
Copy link
Owner

camrein commented Jan 2, 2018

@lmftiv Thanks for hinting the incomplete support for the latest models.
@lucasvieites Did I understand you right? You had success running the whole setup on your Fedora machine, but it fails on Raspbian for the same machine?

I have just merged a pull request I received earlier by @tinyisland in the branch protocol_v3_fixes. The changes include that rather than waiting a fixed time between EEPROM erase, and image upload, it waits for a response code. It has been observed that with invalid timing the image upload fails. My assumption was, as it was working for some and for others not, that some people had the luck that the wait time was on the threshold of receiving the response.
So, if you get the chance, may you try the latest state of the mentioned repository?

PS: Nice to hear that you can even run EzGraver on a Raspbian.

Edit: Related to issue #34.
Edit 2: The mentioned fix will probably not work yet as it appears to be incomplete unless I have missed something.

@lucasvieites
Copy link
Author

Hi @camrein , you understood correctly I can work fine with the man branch on Fedora 26 (although selecting protocol v2 in the UI).
I have just downloaded the branch you mentioned to my Raspberry PI but it has the same behavior. I tried the following steps with both v2 and v3 protocol selected (messages in the UI pane in italic):

  1. Drag a test file to the UI (black and white BMP)
    • loading image: /home/pi/Downloads/TEST.bmp
  2. Select the serial port (ttyUSB0) and v2, click on Connect
    • connecting to port ttyUSB0 with protocol version 2
    • connection established successfully
  3. Click Upload
    • erasing EEPROM
    • uploading image to EEPROM
    • upload completed
  4. Click on Preview
    • nothing happens (on command line: drawing image preview > transmitting 1 bytes: "f4")
  5. Click on Start
    • nothing happens
    • starting engrave process with burn time 60

Command line output:

instantiating EzGraver on port "ttyUSB0" with protocol version 2
erasing EEPROM
transmitting 8 bytes: "fefefefefefefefe"
converting image to bitmap
uploading image
transmitting 32830 bytes in chunks of size 8192
Bytes written: 4160
drawing image preview
transmitting 1 bytes: "f4"
setting burn time to: 60
transmitting 1 bytes: "3c"
starting engrave process
transmitting 1 bytes: "f1"

Is there a way I can get more debugging info that could be useful for you?

Kind regards,
Lucas

@camrein
Copy link
Owner

camrein commented Jan 2, 2018

As I am currently cleaning up the changes made in the pull request in order to make the code style consistent, I have noticed changes which also affect protocol v2. As the situation you're describing sounds similar to me (early state of EzGraver), I am pretty sure that's reasoned to the changed timeout delay between erasing and uploading (6000ms on master branch whereas this branch has only 500ms). But it doesn't explain why it didn't work earlier for you.

So, as you said you have success on protocol v2 on Fedora, please retry the master branch (or a tar of v3.2.0) on your Raspberry and use v2 as well.
I'm pretty confident that should work unless you are using two different engravers (even though they are the same model).

Another thing to make sure which protocol you should use. The movement commands should work only on one of the three protocols you can select. I suppose this will be protocol v2 for you as well.

PS: Maybe unnecessary to mention, but please don't forget to uninstall with make uninstall the binaries prior building and installing the new ones (if you used make install before).

@lucasvieites
Copy link
Author

Hi, please excuse the delay in my response. I have recently had time again to play around on the raspi but no success. I'm going to have to dig deeper as it looks like I'm missing a library or something similar.
I'll get back when I have more info.
Cheers,
Lucas

@onebeartoe
Copy link

onebeartoe commented Apr 13, 2018

Hi folks. I hope I am not hijacking this thread, but I wanted to share my experience on Raspberry Pi 3.

Using the unix_cli_fixes branch, I was able to use the EzGraverCli command to start a print.

I tried pausing and reseting the in-progress print but it didn't work the first time; not sure why as I saw the expected messages and didnt see any error messages.

But on the second attempt the Neje engraver correctly processed the start, pause, and reset commands!

Thanks again for the great work!

@camrein
Copy link
Owner

camrein commented Apr 15, 2018

Thanks for sharing your experience with us.

Indeed, it is strange that your first try only worked partially. Although, I have to tell that seeing messages is not a reliable source about how things are working. As long you see no error messages, it basically means the communication with the device/engraver is working. However, there is no feedback telling that the instruction sent has been recognized and processed. One exception is the progress output when engraving an image.

Glad you like it and thanks a lot for your feedback.

@onebeartoe
Copy link

Yep, no problem. And yes I really like being able to control the Neje engraver from Linux!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants