Zum Inhalt springen

Laser/Hacking: Unterschied zwischen den Versionen

Pwnschlager (Diskussion | Beiträge)
Pwnschlager (Diskussion | Beiträge)
Zeile 32: Zeile 32:


We didn't get the net- to work (haha) so we are using USB right now.  
We didn't get the net- to work (haha) so we are using USB right now.  
Someone else already documented the protocol.
Apparently everything is scrambled in some way byte-wise.
https://stefan.schuermans.info/rdcam/messages.html
The descrambling process documented there didn't work for us.
Since different versions of the program seem to use different magic numbers we decided to try to brute-force it.
Turns out it's a new one: <code>0x33</code>.
==== Setup Messages [Still Scrambled] ====


Notation:  
Notation:  
Zeile 39: Zeile 49:
</pre>
</pre>


==== Setup Messages ====
Before sending the job to the lasercutter the driver sends and receives a few preflight messages.  
Before sending the job to the lasercutter the driver sends and receives a few preflight messages.  
We are unsure if they change when using the Network but they are omitted when saving a job to a file.  
We are unsure if they change when using the Network but they are omitted when saving a job to a file.  
Zeile 69: Zeile 78:
</pre>
</pre>


===== Click 'Search' =====
===== Click 'Search' [Still Scrambled] =====


<pre>
<pre>
Zeile 212: Zeile 221:


After this the actual job data is sent by the driver.
After this the actual job data is sent by the driver.
==== Job Data ====
The job data seems to be structured as follows:
1. [Unknown Data]
* (as of now always 59 bytes)
2. [Speed Data]
* (as of now always 8 bytes)
3. [Power Data x4]
* (as of now always 5 bytes for each of [Min Power Laser 1, Min Power Laser 2, Max Power Laser 1, Max Power Laser 2] )
4. [Unknown Data]
5. [Speed Data again, but a little different]
6. [Unknown Data]
7. [Power Data again, but a little different x4]
8. [Unknown Data]
===== 1. Unknown Data =====
59 bytes of ???
===== 2. Speed Data =====
<pre>
# Prefix (i think, not a 100% on that)
0xfb
0x38 (8)
0x34 (4)
0x34 (4)
0x34 (4)
# Value Bytes x3
0x36 (6)
0xc0
0x14
</pre>
'''50 mm/s:'''
<pre>
0xb2 (178) ()
0x36 (54) (6)
0x64 (100) (d)
</pre>
'''100 mm/s:'''
<pre>
0x36 (54) (6)
0xc0 (192) ()
0x14 (20) (�)
</pre>
'''1000 mm/s:'''
<pre>
0x90 (144) ()
0x38 (56) (8)
0x74 (116) (t)
</pre>
===== 3. Power Data [x4] =====
<pre>
# Prefix
0x75 (u) <- Always the same (message type identifier?)
0x84    <- Laser and Min/Max Byte
0x34 (4) <- Always the same (delimiter?)
# Value Bytes x2
0x16
0x02
</pre>
The Laser and Min/Max Byte is one of:
* <code>0x84</code> (Laser 1 MinPower)
* <code>0xf4</code> (Laser 2 MinPower)
* <code>0x02</code> (Laser 1 MaxPower)
* <code>0x72</code> (Laser 2 MaxPower)
''' 0% '''
<pre>
0x34 (52) (4)
0x24 (36) ($)
</pre>
''' 0.5% '''
<pre>
0x34 (52) (4)
0xe4 (228) ()
</pre>
''' 1% '''
<pre>
0xb4 (180) ()
0x92 (146) ()
</pre>
''' 5% '''
<pre>
0x36 (54) (6)
0x82 (130) ()
</pre>
''' 50% '''
<pre>
0x8e (142) ()
0xce (206) ()
</pre>
''' 100% '''
<pre>
0xce (206) ()
0xce (206) ()
</pre>
===== 4. Unknown Data =====
???
===== 5. Speed Data Again =====
<pre>
# Prefix is shorter this time
< 0xfb
< 0x32 (2)
< 0x34 (4)
< 0x34 (4)
# Value bytes are the same as above
< 0x36 (6)
< 0xc0
< 0x14
</pre>
===== 6. Unknown Data =====
???
===== 7. Power Data Again [x4] =====
<pre>
# Prefix
0x75 (u) <- Always the same (message type identifier?)
0xb4    <- Laser and Min/Max Byte
[No 0x34 byte this time.]
# Value Bytes are the same
0x16
0x02
</pre>
The Laser and Min/Max Byte is one of (last 4 bits are the same as in the first set of messages):
* <code>0xb4</code> (Laser 1 MinPower) (<code>0x84 + 0x30</code>)
* <code>0x94</code> (Laser 2 MinPower) (<code>0xf4 - 0x60</code>)
* <code>0x32</code> (Laser 1 MaxPower) (<code>0x02 + 0x30</code>)
* <code>0x12</code> (Laser 2 MaxPower) (<code>0x72 - 0x60</code>)
Comparison with first Laser Min/Max bytes in binary:
<pre>
1234 5678   
1000 0100  0x84  First Laser 1 Min
1111 0100  0xf4  First Laser 2 Min
0000 0010  0x02  First Laser 1 Max
0111 0010  0x72  First Laser 2 Max
1011 0100  0xb4  Secnd Laser 1 Min
1001 0100  0x94  Secnd Laser 2 Min
0011 0010  0x32  Secnd Laser 1 Max
0001 0010  0x12  Secnd Laser 2 Max
bit 6 == is min?
bit 7 == is max?
</pre>


=== Laserfirmware ===
=== Laserfirmware ===
Nope.
Nope.