Leetro: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 17: Line 17:
! Command !! Length !! Code !! Parameters !! Ranges
! Command !! Length !! Code !! Parameters !! Ranges
|-
|-
| arc_center || 4 || 0x4020300 || (p1, p2), p3, p4, (p5, p6) || 0x2000001, p1[2-4], p2[2-4]
| arc_center || 4 || 0x4020300 || (p1, p2), p3, p4, (p5, p6) || 2 <= p1 <= 4, 2 <= p2 <= 4, 0x2000001
|-
|-
| c_arc_curve || 3 || 0x3000c09 || p1, p2, (p3,p4) ||  
| c_arc_curve || 3 || 0x3000c09 || p1, p2, (p3,p4) ||  
Line 23: Line 23:
| c_bzerve_curve || 8 || 0x8000b09 || p1, p2, p3, p4, p5, p6, p7, p8 ||  
| c_bzerve_curve || 8 || 0x8000b09 || p1, p2, p3, p4, p5, p6, p7, p8 ||  
|-
|-
| c_change_multi_voltage || 3 || 0x3003509 || p1, p2, 0x3003509 || 0x2000003 (p1 or p2 failure)
| c_change_multi_voltage || 3 || 0x3003509 || p1, p2, 0x3003509 || 0 <= p1 <= 10,000, 0 <= p2 <= 10,000, 0x2000003
|-
|-
| c_change_voltage || 2 || 0x2003509 || p1, 0x2003509 || 0x2000003 (p1 failure)
| c_change_voltage || 2 || 0x2003509 || p1, 0x2003509 || 0 <= p1 <= 10,000, 0x2000003
|-
|-
| c_curve_begin || 1 || 0x1000109 || (p1, p2) ||  
| c_curve_begin || 1 || 0x1000109 || (p1, p2) ||  
Line 31: Line 31:
| c_curve_end || 0 || 0x209 ||  ||  
| c_curve_end || 0 || 0x209 ||  ||  
|-
|-
| c_delay_time || 2 || 0x2003209 || p1 * 20, 0x2003209 || 0x2000004 (p1 failure)
| c_delay_time || 2 || 0x2003209 || p1 * 20, 0x2003209 || 0 <= p1, 0x2000004
|-
|-
| c_fast_line2 || 2 || 0x2020309 || p1, p2 ||  
| c_fast_line2 || 2 || 0x2020309 || p1, p2 ||  
Line 47: Line 47:
| c_set_max_accel || 1 || 0x1004509 || (p1, p2) ||  
| c_set_max_accel || 1 || 0x1004509 || (p1, p2) ||  
|-
|-
| c_set_move_profile || 3 || 0x3000a09 || (p1,p2), (p3,p4), (p4,p5)|| 0x2000002 ((p2,p1) or (p4,p3) failure)
| c_set_move_profile || 3 || 0x3000a09 || (p1,p2), (p3,p4), (p4,p5)|| 0 <= (p2,p1) <= 1m, 0 <= (p4,p3) <= 1m,  0x2000002
|-
|-
| c_set_multi_power || 7 || 0x7002009 || p1, p2, p3, p4, (p5,p6), (p7,p8), p9|| 0x2000002 ((p6,p5), (p8,p7), p1, p2, p3, p4 failure)
| c_set_multi_power || 7 || 0x7002009 || p1, p2, p3, p4, (p5,p6), (p7,p8), p9|| 0x2000002 ((p6,p5), (p8,p7), p1, p2, p3, p4 failure)

Revision as of 01:55, 6 June 2020

Leetro

The Leetro laser cutter board is a proprietary controller with proprietary software. In the case of Leetro this software is called `LaserCut`. Like most proprietary laser cutting software intended for a specific board it has significant disadvantages and the only open source solutions are attempts at reverse engineering. In this case the reverse engineering is still very minor and scattershot. To the point that there do not seem to be any third party applications that work with the software.

USB Protocol

The usb device is located at vendor 0548 with a PID of 1005

These are sent to endpoint 0x04 and read from 0x88.

Leetro Commands

There are some parsing attempts made through London Hackerspace to decode .mol files, here's a list of the commands and their values:

Command Length Code Parameters Ranges
arc_center 4 0x4020300 (p1, p2), p3, p4, (p5, p6) 2 <= p1 <= 4, 2 <= p2 <= 4, 0x2000001
c_arc_curve 3 0x3000c09 p1, p2, (p3,p4)
c_bzerve_curve 8 0x8000b09 p1, p2, p3, p4, p5, p6, p7, p8
c_change_multi_voltage 3 0x3003509 p1, p2, 0x3003509 0 <= p1 <= 10,000, 0 <= p2 <= 10,000, 0x2000003
c_change_voltage 2 0x2003509 p1, 0x2003509 0 <= p1 <= 10,000, 0x2000003
c_curve_begin 1 0x1000109 (p1, p2)
c_curve_end 0 0x209
c_delay_time 2 0x2003209 p1 * 20, 0x2003209 0 <= p1, 0x2000004
c_fast_line2 2 0x2020309 p1, p2
c_outport_bit 2 0x2003609 (p1 - 1), 0x2003609
c_outport_byte 2 0x2003709 p1 & 3F, 0x2003709
c_set_laser_mode 2 0x2003409 p1, 0x2003409
c_set_lkh_length 1 0x1000e09 p1
c_set_lkh_step 1 0x1000d09 p1
c_set_max_accel 1 0x1004509 (p1, p2)
c_set_move_profile 3 0x3000a09 (p1,p2), (p3,p4), (p4,p5) 0 <= (p2,p1) <= 1m, 0 <= (p4,p3) <= 1m, 0x2000002
c_set_multi_power 7 0x7002009 p1, p2, p3, p4, (p5,p6), (p7,p8), p9 0x2000002 ((p6,p5), (p8,p7), p1, p2, p3, p4 failure)
c_set_power 5 0x5002009 p1, p2, (p3, p4), (p5,p6), p7 0x2000003 ((p4,p3), (p6,p5), p1, p2 failure)
c_set_vector_profile 3 0x3000409 (p1, p2), (p3, p4), (p5, p6) 0x2000002
c_write_data 3 0x3003309 p1, p2, 0x3003309
change_multi_voltage 2 0x2000120 p1, p2 0x2000003
change_power_ontime 1 0x1020109 p1
change_speed_ontime 1 0x1020009 (p1,p2)
change_voltage 1 0x1000120 p1 0 <= p1 <= 10,000, 0x2000003
change_voltage2 1 0x1000b20 p1 0x2000003 (p1 failure)
check_batch_done - - - (not export command)
check_done - - p1 (not export command)
check_home - - p1 (not export command)
check_limit - - p1 (not export command)
check_SD - - p1 (not export command)
check_status - - p1 (not export command)
check_status32 - - p1 (not export command)
checkin_bit - - (p1 - 1) (not export command)
checkin_byte - - - (not export command)
con_hmove 2 0x2010200 p1, p2 0x2000001 (p1 failure)
con_hmove2 3 0x3020200 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
con_line2 3 0x3022000 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
con_pmove 2 0x2010000 p1, p2 0x2000001 (p1 failure)
con_pmove2 3 0x3020000 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
con_vmove 2 0x2010100 p1, p2 0x2000001 (p1 failure)
con_vmove2 3 0x3020100 (p1, p3), p2, p2 (yes, p2 twice) 0x2000001 (p1, p3 failure)
con_decel_stop 1 0x1010102 p1 0x2000001 (p1 failure)
con_decel_stop2 1 0x1020102 (p1,p2) 0x2000001 (p1, p2 failure)
con_decel_stop3 1 0x1030102 (p1,p2,p3) 0x2000001 (p1, p2, p3 failure)
delay_time 1 0x1000602 p1 * 20 0x2000004 (p1 failure)
end_backlash 1 0x1004b01 (p1,0) 0x2000001 (p1 failure)
fast_arc_center 4 0x4024300 (p1, p2), p3, p4, (p5,p6) 0x2000001 (p1, p2 failure)
fast_hmove 2 0x2014200 p1, p2 0x2000001 (p1 failure)
fast_hmove2 3 0x3024200 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
fast_line2 3 0x3026000 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
fast_pmove 2 0x2014000 p1, p2 0x2000001 (p1 failure)
fast_pmove2 3 0x3024000 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
fast_vmove 2 0x2014100 p1, p2 0x2000001 (p1 failure)
fast_vmove2 3 0x3024100 (p1, p3), p2, p4 0x2000001 (p1, p3 failure)
get_abs_pos - - p1, *p2 (not export command)
get_fmw_ver - - - (not export command)
get_hdw_ver - - - (not export command)
get_lib_ver - - - (not export command)
get_sn - - - (not export command)
get_init_board - - - (not export command)
move_pause 0 0x202
move_resume 0 0x302
outport_bit 1 0x1000105 (p1 -1)
outport_byte 1 0x1000205 p1 & 0x3F
read_data - - p1 (not export command)
reset_pos - 0x2014501 defers to set_abs_pos(p1, 0) 0x2000001 (p1, failure)
set_abs_pos 2 0x2014501 p1, p2 0x2000001 (p1 failure)
set_axis_ratio 2 0x2015001 p1, (p2, p3) 0x2000001 (p1 failure)
set_backlash 2 0x2004a01 p1, p2 0x2000001 (p1 failure)
set_batch_flag - - - (not exported)
set_conacc_start_speed 1 0x1025101 (p1,p2)
set_conspeed 2 0x2010001 p1, (p2,p3) 0x2000001 (p1 failure)
set_home_mode 1 0x1014001 (p1,p2) 0x2000001
set_laser_mode 1 0x1000220 p1 0x2000001 p1[0-4]
set_level_in 1 0x1014d01 defers to set_level_sprt(p1, (p2)?9:0) 0x2000001 (p1 failure)
set_level_sprt 1 0x1014d01 (p1, p2 & 0xF) 0x2000001 (p1 failure)
set_maxspeed 2 0x2014301 p1, (p2, p3) 0x2000001 (p1, (p3,p2) failure)
set_outmode 1 0x1014101 (p1,p2,p3) 0x2000001 (p1 failure)
set_power_mode 1 0x1000320 p1
set_profile 4 0x4010101 p1, (p2,p3), (p4,p5), (p6,p7)
set_pwm2_frq 1 0x1000a20 p1 [1.0 - 600000.0]
set_pwm_frq 1 0x1000420 p1 [1.0 - 600000.0]
set_scan_startpos 1 0x1000620 p1
set_scan_step 1 0x1000520 p1 - 1
set_signal_in 1 0x1014e01 (p1, p2 & 0x1F) 0x2000001 (p1 failure)
set_vector_conspeed 1 0x1000201 (p1, p2)
set_vector_profile 3 0x3000301 (p1, p2), (p2, p3), (p5,p6)
start_backlash 1 0x1004b01 (p1,2)
sudden_stop 1 0x1010002 p1
sudden_stop2 2 0x1020002 (p1,p2)
sudden_stop3 1 0x1030002 (p1,p2,p3)
write_data 2 0x2000305 p1, p2
write_data_block ? 0x80000720 ?
write_power_data ? 0x80000820 ?
write_power_tab ? 0x80000920 ?

init_board calls a series of commands to set these to valid and acceptable defaults:

Command Called Static Paramaters Used
set_batch_flag 1
set_maxspeed 0, 0x412e8480
set_out_mode 1, 0
set_home_mode 0
set_con_speed 0 , 0x409f4000
set_profile 0, 0x409f4000, 0, 0x40bf4000, 0, 0x40f38800
set_vector_conspeed 0, 0x409f4000
set_vector_profile 0, 0x409f4000, 0, 0x40bf4000, 0, 0x40f38800
set_laser_mode 0

Reverse engineering resources.

Links

Official

Other Sources