Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on El Capitan 10.11.6 #5

Open
gistsnippetss opened this issue Jun 30, 2017 · 8 comments
Open

Not working on El Capitan 10.11.6 #5

gistsnippetss opened this issue Jun 30, 2017 · 8 comments

Comments

@gistsnippetss
Copy link

Are the system requirements insurmontable?

@gistsnippetss
Copy link
Author

I'm also on 10.11.6 :(

@flemingm
Copy link

flemingm commented Jan 8, 2018

I did some debugging In OS X 10.12.6

I was about to get it to locate the USB Serial driver.
And react to upload option (system seem to reset the laser).

But does not respond to other commands.

Initial debugging show the the data seem to send to the serial port library routines. and the all the serial port call backs seem toe be working (disconnect, reconnect, open, etc).

minor issue:

@IBOutlet weak var barBarItem: NSCustomTouchBarItem! requires 10.12.2 or later...

to get it to compile under OS X 10.12.6 and XCODE Version 9.2 (9C40b)
I modified ViewController.swift to add @available(OSX 10.12.2, *) and set project to use latest SDK.

ie.

//
//  ViewController.swift
//  NejeEngraver
//
//  Created by Andy Qua on 22/10/2016.
//  Copyright © 2016 Andy Qua. All rights reserved.
//

import Cocoa

@available(OSX 10.12.2, *)
class ViewController: NSViewController {

Don't know where to go from this... any pointers to trouble shoot ?

@gistsnippetss
Copy link
Author

You went much further than any of us :)

@flemingm
Copy link

flemingm commented Jan 27, 2018

When I get time I will post to the Serial library list or stack overflow for help.

https://github.com/armadsen/ORSSerialPort

http://cocoadocs.org/docsets/ORSSerialPort/1.5.1/

Also found:
camrein/EzGraver#34
that it could be firmware change.

Also latest Mac Driver is at:
http://www.wch.cn/download/CH341SER_MAC_ZIP.html

Tip: You can run it from your Mac using Virtual Box and Windows 10 if you need a work around.

@flemingm
Copy link

Found a interesting Windows Serial port sniffer.
https://freeserialanalyzer.com
This should allow me to capture data from the windows Engraving application and confirm protocol has not changed!

@flemingm
Copy link

End up using USB Recording...


Connect button:

Setup Packet
 40 9A 27 27 00 00 00 00    
Recipient: Device
Request Type: Vendor
Direction: Host->Device
Request: 0x9a (Unknown)
Value: 0x2727
Index: 0x0
Length: 0x0

Pressing connect button:

000772: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:36:51.8212185 +0.0003834 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 09 00 00                                       ÿ...

Response....

Connect OK
NEJE-DK3000

000774: Bulk or Interrupt Transfer (UP), 2018-01-29 23:36:51.8402179 +0.0187789. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x8 bytes from the device
 FF 02 0B 01 FF 0A 00 3C                   


Center...
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 02 01 00

 Pause...                                     ÿ...
000778: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:38:07.0378780 +18.8167546 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 01 02 00           

UP
000782: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:38:51.1549775 +39.8718174 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 03 01 00

 Down                       
000784: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:38:53.5226904 +2.3672814 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 03 02 00

 Left                           
000786: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:38:55.0213280 +1.4983342 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 03 03 00

 Right...                       
000788: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:38:56.0712884 +1.0495938 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 03 04 00


 Center
000792: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:41:08.7278595 +131.6128152 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 02 01 00                    


Box Locate   -- keep going around outer Edge until Center command or any position comment received.
000796: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:41:49.4610445 +39.2070969 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 02 02 00                      

-----------------


Any position

Move to(12,0)
looks like FF 0A <X Hight Byte, X Low Byte> FF 0B <Y Hight Byte> <Y Low Byte>
NOTE: No feedback received back...

000800: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:42:53.7588202 +39.1919256 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x8 bytes to the device
 FF 0A 00 0C FF 0B 00 00

Move to(480,1)
000802: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:43:02.8100208 +9.0508919 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x8 bytes to the device
 FF 0A 04 50 FF 0B 00 01

Move to(478,488)
000804: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:43:09.7337036 +6.9233474 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x8 bytes to the device
 FF 0A 04 4E FF 0B 04 58

Move to(10,488)
000806: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:43:12.6995595 +2.9653870 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x8 bytes to the device
 FF 0A 00 0A FF 0B 04 58

------------------------------

Set lazer level


Laser Value : 56 = 0x38
006040: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:48:56.1798924 +12.9274881 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 05 38 00                 

Response: 
006042: Bulk or Interrupt Transfer (UP), 2018-01-29 23:48:56.2078175 +0.0275905. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x4 bytes from the device
 FF 0A 00 38


Laser Value : 61 = 0x3d
006044: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:49:02.2473398 +6.0394480 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 05 3D 00     
006046: Bulk or Interrupt Transfer (UP), 2018-01-29 23:49:02.2748905 +0.0271345. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x4 bytes from the device
 FF 0A 00 3D

Laser Value : 66
006048: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:49:05.8751790 +3.6002356 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 05 42 00              
006050: Bulk or Interrupt Transfer (UP), 2018-01-29 23:49:05.9026492 +0.0272313. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x4 bytes from the device
 FF 0A 00 42


Laser Value : 100
006052: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:49:14.8382285 +8.9355370 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 05 64 00                  
006054: Bulk or Interrupt Transfer (UP), 2018-01-29 23:49:14.8661264 +0.0274977. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x4 bytes from the device
 FF 0A 01 00

 Laser Value : 50
006056: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:49:23.0716670 +8.2054400 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 05 32 00          
006058: Bulk or Interrupt Transfer (UP), 2018-01-29 23:49:23.0995095 +0.0275075. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x4 bytes from the device
 FF         ...                                   
---------------------------------------
Uploading...


dataToSend: 32768
Erasing Menory...
Erase Done!
Downloading...
Download Finished
Verify OK
                                     ÿ...
000226: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:21:50.9076135 +5.1998919 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 06 01 00                                       ÿ...
000228: Bulk or Interrupt Transfer (UP), 2018-01-29 23:21:50.9355559 +0.0276402. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x4 bytes from the device
 FF 05 01 00     
 
                                   ÿ...
000230: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:21:51.0359932 +0.1003770 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x400 bytes to the device
 00 7F B6 AA AB 77 76 AA AA AA AA AA AD B6 AA AB   .�¶ª«wvªªªªª­¶ª«
 6F FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF   oÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
 FF 6E FF FF FF                                    ÿnÿÿÿ

... 

 Image data
 
DOn't know if I got a response..  ... Need to check with new image.

-------
Start carving...

000808: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:43:15.9987988 +3.2988686 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 02 01 00
                                   ÿ...
000810: Bulk or Interrupt Transfer (DOWN), 2018-01-29 23:45:58.8000959 +162.8009756 (1. Device: USB-SERIAL CH340 (COM3))
Pipe Handle: 0x31038d10 (Endpoint Address: 0x2)
Send 0x4 bytes to the device
 FF 01 01 00


Feed back from carver...   one backet for each location carved.

Look like Ff 03 < X Hight, X Low >  FF 04 < Y Hight Byte, Y Low Byte >

000812: Bulk or Interrupt Transfer (UP), 2018-01-29 23:46:02.4869161 +3.6864396. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x8 bytes from the device
 FF 03 00 09 FF 04 00 00

000814: Bulk or Interrupt Transfer (UP), 2018-01-29 23:46:02.5480602 +0.0610747. (1. Device: USB-SERIAL CH340 (COM3)) Status: 0x00000000
Pipe Handle: 0x3126cbb0 (Endpoint Address: 0x82)
Get 0x8 bytes from the device
 FF 03 00 0A FF 04 00 00                 

.....



@flemingm
Copy link

I have made some progress on convert to new protocol. Still having issue uploading image but that is almost working.

Protocol changed for v3.5 or later of the software :)

Here is the current changes.
v3 update.zip

@firstel
Copy link

firstel commented Aug 10, 2018

has there been any new progress on this? i just got a new Neje DK-8-KZ (firmware 2)and would really like a native Mac app to drive it.

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

No branches or pull requests

3 participants