Author Topic: RS232 Serial Decoding and Reverse Engineering  (Read 19704 times)

0 Members and 1 Guest are viewing this topic.

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: es
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #25 on: October 29, 2013, 08:24:06 am »
A 6809 with 8k ROM and 8k RAM - nice!
Just for curiosity again - if you have a prommer to read that 2764, i can look at the dump in disassembler.
 

Offline Mad ProfessorTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: gb
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #26 on: October 29, 2013, 05:01:31 pm »
abyrvalg
As said in my 1st post:
Quote
The other way I might be able to get useable data is to remove the EEPROM chip and store a dump of the chip, but I don't have the hardware or the knowhow for that at this point in time.
 

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 826
  • Country: es
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #27 on: October 30, 2013, 08:46:47 am »
Some code like this:
Code: [Select]
switch(cmd[current_position++])
{
   case 'M':
       //parse number after M
   ...
   case 'U':
   ...
}
is more probable to see in a size-constrained firmware, but this leaves nothing visible in text view (btw, control PC's software should be a much easier target for such quick text-mode lookup, they can just printf() to strings like "M09;M13;U04;V05;E%04d;M09;U15;").

If you don't have a prommer to read the EPROM - better keep dumping RS232. Anyway, your Mach3 driver will translate single G/M codes to some strings of this "LCB3 language", so you need a string corresponding to a single G/M, not what each M09, U15 etc does
« Last Edit: October 30, 2013, 08:57:16 am by abyrvalg »
 

Offline Mad ProfessorTopic starter

  • Regular Contributor
  • *
  • Posts: 90
  • Country: gb
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #28 on: November 02, 2013, 08:39:31 am »
abyrvalg
Thanks again for your replies and input.

Sorry for the lack of feedback from me, my wife and her friend have just brought 2nd hand cars, and with me being an ex grease monkey I have been roped into doing full service on there cars, and fixing any other problems.

I would not have any idea where to even think about starting with regards to decoding the software it's self.
The Mirac control software can be downloaded direct for the Denford where site here: http://www.denfordata.com/downloads/dos/MIRAC.zip

I am looking to try and get back into my workshop this weekend to start probing more data from the serial lines.

Can anyone here recommend a program for MS-DOS so that I can send the serial commands back to the control board for testing?
Yes I could use the windows computer that I am using for sniffing the serial data, but I can't inject data back into the serial with the lathe computer still connected, and moving a 1m x 1m x 0.6m, 350Kg lathe about in a small working is not an easy task.
« Last Edit: November 02, 2013, 08:48:55 am by Mad Professor »
 

jucole

  • Guest
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #29 on: November 02, 2013, 11:19:33 pm »
If you look in the Mirac.txt file ~ line 1600 onwards there is a load of info.

for example:

Quote
G04  Dwell

A G04 causes the program to wait for a
specified amount of time.

The time can be specified in seconds with
the "X" or "U" prefixes or in milliseconds
with the "P" prefix.

Examples:  G04 X1.5
G04 U1.5
G04 P1500
 

Offline geraldjhg

  • Regular Contributor
  • *
  • Posts: 61
  • Country: ar
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #30 on: November 03, 2013, 03:13:05 pm »
get two rs232 setups running (hyperterminal at least but others are better)  and connect
the rx only to both tx lines on the ongoing setup in both directions of commubnication
 (as it is a high impedance input) you will get an idea what msdos is sending and what the
CNC is responding
if it ascii commands you might be in luck
if its all binary you are in double trouble
G E R A L D
 

Offline VladimirM

  • Newbie
  • Posts: 5
  • Country: cs
Re: RS232 Serial Decoding and Reverse Engineering
« Reply #31 on: January 27, 2017, 06:51:45 pm »
Hello,

for a start, you could just hook up an other computer with a RS232-Port and tap its RX pin into either of the two original communication lines. You will see at least half duplex traffic that way.
Older dos boxes tend to have two RS232 onboard. In DOS (realtime enough by definition) you might be able to dump both lines in parallel. Just write some simple BASIC code to dump the contents in a file. Later use a HEX-Editor of you choice to look at the result.

Use you scopes to determine the boudrate, startbit/stopbit etc. Then you can setup your one/two serial sniffer port(s) to that parameters.

Regarding mach3. I don't know it very well but it does the step sequencing in software, right? (I'm more the EMC2 guy)
I would assume that it is not possible to transmit step/dir information via RS232 for any reasonable machine/speed. It is just too slow. So if you manage to figure out the protocol you might still not be able to interface it to mach3. But well, thats only a bunch of assumptions ...

Best,
Pete

Correct, but you can even monitor full duplex RS232 communication is 2 ports are used and data is forwarded from one to another and vice versa. And then you have information on all the data to see. :)
Docklight  https://docklight.de/  has this option ans it displays all the data very nicely in different colors and in ASCII or binary RAW format.. There are even some advanced scripting options to influence in its traffic.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf