Serial data from controller

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
Reverse engineering anything is akine to trying to break a code.
Im not certain were able to help with reverse engineering what is evidently not your code !

In a general way
You need to understand the "data" you see in any program, as to what it means
e.g. asic is a 7 bit code, represented in a 8 bit field,
or it could be a pure hex number
e..g
if your seeing W3039
is that write 09 ?
or write 3039 ?
or what ?

the same 8 bits at different times could be a control code, a number , a letter dependent upon the protocol.

The data might even be little endian / big endian swapped,
might have a CRC , could even be encrypted

you need first to get a good look at the real data on the line,
1 and 0.
then you can start deciding what it is,

Once you have the above,
then look for patterns,
is there a regular set of data ,
is there correlation between wind going up and a set of data going up

It can be done,
look at things like SAMBA for file access , that was reverse engineered

But its not easy, and takes lots of pain staking logging / recording, and a fair amount of luck,
once you have one bit, you can generally build on that
some times down a false path, but persistance.

Have you looked here
https://freeserialanalyzer.com/
Its a small standalone exe, I have made a copy of it trying to reverse engineer it. I don't care if it breaks that program since I have copies. I own the software and controller, finding out how it works to use for myself, and use that knowledge to be able to data-log is the whole reason I have this device. I don't see any ethical issues with what I am trying to achieve with this.

I have tried several serial analyzers and the data keeps coming up like the screen shot I posted before. the hex doesn't match up with visual data shown in the pc program. Which is why it might not be possible to use that serial data without either some type of register map or finding out what register data the program is using.
 

djsfantasi

Joined Apr 11, 2010
9,156
You can download PuTTy for Windows and use that for a DTE. Also, I think Win10 still includes debug.exe which can display the hex values of each byte in a file.
 

drjohsmith

Joined Dec 13, 2021
852
Its a small standalone exe, I have made a copy of it trying to reverse engineer it. I don't care if it breaks that program since I have copies. I own the software and controller, finding out how it works to use for myself, and use that knowledge to be able to data-log is the whole reason I have this device. I don't see any ethical issues with what I am trying to achieve with this.

I have tried several serial analyzers and the data keeps coming up like the screen shot I posted before. the hex doesn't match up with visual data shown in the pc program. Which is why it might not be possible to use that serial data without either some type of register map or finding out what register data the program is using.
To be pedantic, you say you own the software?
what happened to the source code then ?
If you have only purchased the executable,
check the legal docs,
but normally you have purchased the right to run the software as is
no right to reverse engineer, copy or reproduce it,
that's copy right infringement, which we can not get into on the forums
 

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
To be pedantic, you say you own the software?
what happened to the source code then ?
If you have only purchased the executable,
check the legal docs,
but normally you have purchased the right to run the software as is
no right to reverse engineer, copy or reproduce it,
that's copy right infringement, which we can not get into on the forums
Yes you are correct, I purchased the controller with the included software. There wasn't any docs or readme with the software stating user agreements. I'm not sure if that's because the controller and software are from China? The file came as a zipped file with the exe in it. Nothing to install or agree to.

I agree with you, if it did have a user agreement then yes it wouldn't be something I would want to attempt.
 

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
hi S07,
Download the Relyze program from this link.
It analyses the wind exe OK, but I don't have the time to read the results.
E

https://mohamad-wael.medium.com/best-microsoft-windows-disassemblers-and-decompilers-6fdfbf9990de
Thanks for that. I was able to view pretty much everything and found where it displays the parameters I am looking for but I guess I don't know enough of how these programs work to find how it gets that data. Maybe this is beyond my programming abilities on how to make this work. I was hoping it would be similar to modbus which I know well, but this is not the case.
 

MisterBill2

Joined Jan 23, 2018
18,176
A hex file viewer might be similar to the DTE. If the file can simply be downloaded and saved, then it might be possible to open and read it with a text reading program, if it can be saved with a .txt extension.

If you crack the code but never let anybody know then you should be safe, because it does not compromise their profits.
Even if you publish the format of the transmitted data, that does not involve the code that executes.
So unless you go wild nobody will ever have a reason to even investigate.
 
Last edited:

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
A hex file viewer might be similar to the DTE. If the file can simply be downloaded and saved, then it might be possible to open and read it with a text reading program, if it can be saved with a .txt extension.

If you crack the code but never let anybody know then you should be safe, because it does not compromise their profits.
Even if you publish the format of the transmitted data, that does not involve the code that executes.
So unless you go wild nobody will ever have a reason to even investigate.
Right, I am just using it for myself on the computer system I built. It has nothing to do with their program. I do not even want to use their program but its the only way I can currently view the data.
 

drjohsmith

Joined Dec 13, 2021
852
Right, I am just using it for myself on the computer system I built. It has nothing to do with their program. I do not even want to use their program but its the only way I can currently view the data.
Just remember , thats called the I did not realises "defence"
wont stand up , not least as you have put on a public forum what your doing.
 

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
Just remember , thats called the I did not realises "defence"
wont stand up , not least as you have put on a public forum what your doing.
Alright whatever, I guess this will remain unsolved. Thank you for the people willing to help. I guess I will just have to manually write down the values and plot them for my self instead of making a program work. I’ll be waiting for the China legal team to contact me for this, also for not selling or distributing their top secret way of sending serial data. I’m sure my auto manufacturer will be after me for modifying the way my cup holder works in my car.
 

MisterBill2

Joined Jan 23, 2018
18,176
Just remember , thats called the I did not realises "defence"
wont stand up , not least as you have put on a public forum what your doing.
So far we have not seen one single character of any code relating to any software of any variety. And besides that, we are not even talking about the software that the TS has purchased the right to use.
In a police-state things might be different, but it does not seem that any other of the folks participating in this thread live in a police state.
 

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
I can’t seem to figure out how that program reads the data. It could be unrecognizable after it got bundled and changed to an exe. Back to serial commands, from my first screenshots, shouldn’t I be able to send the same hex command as the sniffer showed the computer sending to get a response via pythons serial module?
 

strantor

Joined Oct 3, 2010
6,782
I can’t seem to figure out how that program reads the data. It could be unrecognizable after it got bundled and changed to an exe. Back to serial commands, from my first screenshots, shouldn’t I be able to send the same hex command as the sniffer showed the computer sending to get a response via pythons serial module?
I don't know, your sniffer seems to be doing some amount of protocol deciphering on its own, as evidenced by how it's categorizing the messages. It's unclear to me whether it's stripping off the headers, footers, checksums, terminators, etc and displaying only the payload, or if it is displaying the entire message. One way to find out: try it
 

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
I don't know, your sniffer seems to be doing some amount of protocol deciphering on its own, as evidenced by how it's categorizing the messages. It's unclear to me whether it's stripping off the headers, footers, checksums, terminators, etc and displaying only the payload, or if it is displaying the entire message. One way to find out: try it
No luck, I am wondering if something is sent upon connection that I am missing. The way the sniffer program works is that it needs to be connected to the main program and running before the sniffer will get data. I am guessing there's a 4 bit hex code that its waiting for to start spitting out the data.
 

WBahn

Joined Mar 31, 2012
29,979
In general, reverse engineering software is not illegal. It's what you do with the results of your research that can get you in trouble. I don't see anything here that is likely to cross the line.
 

strantor

Joined Oct 3, 2010
6,782
The way the sniffer program works is that it needs to be connected to the main program and running before the sniffer will get data.
I can't make any sense of this statement.
Is this a software sniffer monitoring the COM port on your PC? Or is it a device that is physically connected to the serial wires? What exactly is it?

No luck, I am wondering if something is sent upon connection that I am missing. [...] I am guessing there's a 4 bit hex code that its waiting for to start spitting out the data.
There is probably more than a 4 bit code going on. Likely there is a whole protocol with certain commands sent, for the device to reply with certain data, or to take a certain action. There is probably a header containing that command and maybe specifying the length of the message to follow. Then the message. Then there is probably a termination flag and maybe or maybe not, a checksum.
 

Thread Starter

Slvrsky07

Joined Jan 29, 2023
51
I can't make any sense of this statement.
Is this a software sniffer monitoring the COM port on your PC? Or is it a device that is physically connected to the serial wires? What exactly is it?


There is probably more than a 4 bit code going on. Likely there is a whole protocol with certain commands sent, for the device to reply with certain data, or to take a certain action. There is probably a header containing that command and maybe specifying the length of the message to follow. Then the message. Then there is probably a termination flag and maybe or maybe not, a checksum.
It is monitoring the com port on the pc.
 
Top