Author Topic: Need help hacking DP832 for multicolour option.  (Read 151943 times)

0 Members and 1 Guest are viewing this topic.

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Need help hacking DP832 for multicolour option.
« on: December 24, 2015, 09:08:58 pm »
Hello,

I'm sorry if this has been asked before and I'm not sure if this is the proper sub-forum to ask in.   If it's not, I apologize and maybe a moderator could move the post.   I have a Rigol 832 Programmable Power Supply.   It's been absolutely wonderful.   I found the keygen a long time ago to upgrade the unit.   One of the upgrade no longer works.   I can't remember which one but I remember reading that if I upgraded the firmware, the one option would be removed.   I wanted to know if that ever got fixed?   I can try and find out what option it was that disabled by the firmware upgrade if needed.   I can't seem to find the forum anymore with the keygen.  I thought it was here on EEVBlog.

Anyway, on to my main question.   The DP832A has a multi-colour option for the main screen.   You know, where you can have more than one colour displayed at the same time.   I was curious if there was any way to get this on the original DP832?   I'd like to keep the classic UI if at all possible.   Does anyone know if what I want is doable and if so, how I'd go about doing it?   Thank you.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #1 on: December 24, 2015, 10:04:57 pm »
TBH, even the DP832A "classic" version of the DP832 screen Rigol was forced to include with its 3 colours isn't as nice as the cheaper DP832, at least to most of us. The 'A' does have colour coded buttons and front panel stuff but really all anyone is interested in are the features not the fluff.

One thing the classic DP832 has is when the output is switched off the V and A all go to 0.000 while the DP832A classic just blanks.

I would personally like Rigol to keep the voltmeter switched on much like my HP6632B does it rather than display blank or hard coded 0.000
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #2 on: December 25, 2015, 12:09:50 am »
I thought the screens were the same.   That the screen in my DP832 is the same screen that's in the DP832A.   I thought it was just firmware or something along that route that makes it so I can only display one colour, more less, on the screen at one time.   Am I wrong in this assumption?
 

Offline nidlaX

  • Frequent Contributor
  • **
  • Posts: 663
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #3 on: December 25, 2015, 02:00:06 am »
Dump the firmware, disassemble it, add color coding.
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #4 on: December 25, 2015, 03:01:08 am »
It doesn't have any security bits set or anything?   I guess I could always just download the firmware from their website and go from there.   Thanks.   Has this been done before?   It'd be nice if there was some sort of how-to to follow.   Perhaps I could download the firmware for the DP832A and use that as a reference.   Thanks for the information.
 

Offline analogNewbie

  • Regular Contributor
  • *
  • Posts: 54
  • Country: cn
Re: Need help hacking DP832 for multicolour option.
« Reply #5 on: December 25, 2015, 11:36:09 am »
of cause you van download the firmware from rigol site. However, you dont know the file format of the firmware file.
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #6 on: December 25, 2015, 06:03:22 pm »
Right.   I don't know the file format of the firmware.   If they're using something like a PIC though, I should be able to load the bin file I'd think in MPLAB X to get the disassembled version.   I'm still really knew to all of this hardware stuff.   I'm trying to learn but there's a lot to learn!   I really appreciate all the help that people provide when I have questions though.   Merry Christmas!
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #7 on: December 25, 2015, 07:33:55 pm »
Most Rigol stuff I've encountered is Blackfin DSP, certainly not PIC  :-DD. The Blackfin will usually have a LDR format firmware.

Here's something on Rigol .GEL files https://www.eevblog.com/forum/testgear/dg4000-a-firmware-investigation/120/
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #8 on: December 26, 2015, 12:15:53 am »
Thank you so much!   Unfortunately, because I'm so new at the hardware stuff, I only have limited experience with PICs.   I really appreciate this information though.   It's pointing me in the right direction, thank you!!
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #9 on: December 28, 2015, 12:26:31 am »
Just got a quick question.   My understanding is that the hardware in the DP832 and the hardware in the DP832A are identical.   Does anyone know if this is true?   If it is, I'm guessing the DP832A firmware must check something like the serial number to see if the unit is a DP832 or a DP832A.   If the serial number isn't within a certain range, maybe the DP832A firmware would refuse to install on the DP832.   Am I right in these assumptions or are there physical differences between the two units?
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #10 on: December 30, 2015, 02:38:46 am »
I've watched the teardown video for the Rigol DP832.   It does appear to be the same hardware as the DP832A.   When looking for a firmware, I could only find one file for the DP832 and the DP832A.   Therefore, I'm left to assume the DP832 and the DP832A use the exact same firmware.   So chances are good the firmware just checks something like serial number to see if it should enable the multicoloured screen and all the available options or if it should turn the options off and show the one coloured screen.

I've been looking at the firmware in a hex editor and looking at the various Blackfin datasheets.   I don't think these files are for a Blackfin.   I noticed with the link that was posted for the Rigol scopes, they show the model number of the scope right at the beginning of the .GEL files.   We don't get that with these firmware files.

When I run the Linux file command on the files though, the bootloader .GEL file shows: hp200 (68010) BSD.     I wonder if that's a Motorola 68010 processor in there or if maybe file is mistaken.  I know when I look at the application firmware, not the bootloader, I see a pattern every so often (more near the endish).   00h through whatever xxh in a row.   First one is at offset 8c and goes to offset 011c.   It goes 00h - 90h.   Second one starts at 06608c and goes to offset 0660cb.    It's 00h - 3Fh but it goes 00 01 02 03 04 05 06 07 08 09 0A 0B 1A FD AE F0 10 11 12 13...    There's a whole bunch of them like that.    I figure maybe the .GEL file is kind of like an archive or something and these mark the start or end of a file or something?   In the middles, there's a whole bunch that don't count very high and they have a little bit of data (maybe 40h bytes or so) before the next set starts.
 

Offline Stupid Beard

  • Regular Contributor
  • *
  • Posts: 221
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #11 on: December 30, 2015, 03:29:51 am »
When I run the Linux file command on the files though, the bootloader .GEL file shows: hp200 (68010) BSD.     I wonder if that's a Motorola 68010 processor in there or if maybe file is mistaken.

Have you tried binwalk?

Edit: The GEL file will be an archive of some sort. There is firmware for at least the main CPU, the analog boards, and probably assorted other things like FPGAs.
« Last Edit: December 30, 2015, 03:33:41 am by Stupid Beard »
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #12 on: December 30, 2015, 03:58:16 am »
Thanks!   I have not tried binwalk but I will give that a shot tomorrow.   I figured one of the two .GEL files was an archive.   The bootloader one though I figured wasn't an archive but just code for whatever CPU was in there.   I might be wrong on that though.   I was hoping to find away to extract the files from at least one of the .GEL files.   Figured that'd be good progress.
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #13 on: December 30, 2015, 07:23:21 pm »
Looking at one of Dave's early teardown photos it's using a Freescale (now known as NXP) i.MX283 ARM9 core Applications Processor

ETA: The 10 pin header is most likely it's JTAG port ;)
« Last Edit: December 30, 2015, 07:29:37 pm by Macbeth »
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #14 on: December 30, 2015, 10:35:46 pm »
Looking at one of Dave's early teardown photos it's using a Freescale (now known as NXP) i.MX283 ARM9 core Applications Processor

ETA: The 10 pin header is most likely it's JTAG port ;)

Thank you for this information!   Are you 100% sure on the processor there?   The teardown video I saw that I believe Dave posted had the CPU but it was etched off with a laser or something.  Some of the font was still visible.   A user commented saying the CPU was made by Silicon Image and that he recognized the font.   Just curious as to whether you're certain it's the Freescale MX283 ARM9 or if it's just an educated guess.   Either way, it'll get me pointed in the right direction.

I don't really have much experience with JTAG stuff.   I JTAGGED a video game console once.   I wonder if there's a way for me to tell for certain if it's a JTAG port or not and what the pinouts are.   Thanks for all the help!
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #15 on: December 31, 2015, 11:50:38 am »
I posted Daves photo and it's clear as day. You have the supporting RAM and flash chips next to it, crystal and JTAG header. The LCD flatflex cable is there and the PCB is labelled DP800_DigitalBoard...  :-//

The IC that had it's ID removed was something else entirely.

The JTAG pinout will most likely be the standard 10 pin ARM layout. Buzz out the VCC and GNDs to make sure.
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #16 on: December 31, 2015, 07:00:35 pm »
I posted Daves photo and it's clear as day. You have the supporting RAM and flash chips next to it, crystal and JTAG header. The LCD flatflex cable is there and the PCB is labelled DP800_DigitalBoard...  :-//

The IC that had it's ID removed was something else entirely.

The JTAG pinout will most likely be the standard 10 pin ARM layout. Buzz out the VCC and GNDs to make sure.

You're awesome!   Thank you!   For some reason, I missed the link of the photo you posted!     What does buzz out mean?   I really appreciate all the help on this!
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #17 on: December 31, 2015, 08:24:08 pm »
Buzz out = continuity test on your DMM. Are you sure you are up to this? It is not an easy job. All the dumping the firmware using JTAG and stuff is the easy bit. Reverse engineering the code is another matter!
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2571
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #18 on: December 31, 2015, 08:35:19 pm »
Oh, you want to use something like OpenOCD and also UrJTAG.

You might find your linux distro has them available by apt-get for easy installation.

Of course you need a supported hardware adapter as well. I have an Olimex USB-OCD that I got for £20 on ebay. I also have a dirt cheap USB Blaster which I think is good enough for dumping code, but not so much for ARM debugging.

Well, happy new year and good luck  :-+
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #19 on: December 31, 2015, 10:45:48 pm »
Buzz out = continuity test on your DMM. Are you sure you are up to this? It is not an easy job. All the dumping the firmware using JTAG and stuff is the easy bit. Reverse engineering the code is another matter!

I want to try Macbeth.   I know I don't understand everything and will probably fail miserably but I love learning and I really want to try very hard.   I look at it like this, worst case, I fail but I will still learn something in the process.   I used to be pretty good at writing code, back in the day.   I was a system programmer and worked for a corporation called Deposit Computer Services, Inc until 2005 or so.   My ability to write code is a bit rusty.   I got a few good books on C now though.   C Programming - A Modern Approach - 2nd Edition by K.N. King and then I have the Red Dragon Book (AKA, Compilers - Principles, Techniques and Tools).  Thanks for all the help though.   I greatly appreciate how everyone's been so helpful and understanding.
 

Offline Stupid Beard

  • Regular Contributor
  • *
  • Posts: 221
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #20 on: December 31, 2015, 11:32:58 pm »
Buzz out = continuity test on your DMM. Are you sure you are up to this? It is not an easy job. All the dumping the firmware using JTAG and stuff is the easy bit. Reverse engineering the code is another matter!

I want to try Macbeth.   I know I don't understand everything and will probably fail miserably but I love learning and I really want to try very hard.   I look at it like this, worst case, I fail but I will still learn something in the process.   I used to be pretty good at writing code, back in the day.   I was a system programmer and worked for a corporation called Deposit Computer Services, Inc until 2005 or so.   My ability to write code is a bit rusty.   I got a few good books on C now though.   C Programming - A Modern Approach - 2nd Edition by K.N. King and then I have the Red Dragon Book (AKA, Compilers - Principles, Techniques and Tools).  Thanks for all the help though.   I greatly appreciate how everyone's been so helpful and understanding.

For reverse engineering programming knowledge helps (a lot), but it's only a small part of the skillset required. You don't need to be able to write code so much as to read assembly language and relate what you're reading to what the C/C++/whatever compiler spits out. You also need a good disassembler and at least some knowledge of the CPU.

If you have no experience in it, you should be able to find a lot of information and tutorials online. It doesn't really matter what processor or languages they're for. I'd suggest starting by disassembling test programs for your desktop computer. Processors and compilers all work in more or less the same way so skills gained on one are usually easily related to others, and it will be a lot easier to try things out and see what's going on with your computer than an embedded thing.

Good luck, it's a pretty large can of worms that you are opening ;)
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #21 on: December 31, 2015, 11:40:15 pm »
Oh, you want to use something like OpenOCD and also UrJTAG.

You might find your linux distro has them available by apt-get for easy installation.

Of course you need a supported hardware adapter as well. I have an Olimex USB-OCD that I got for £20 on ebay. I also have a dirt cheap USB Blaster which I think is good enough for dumping code, but not so much for ARM debugging.

Well, happy new year and good luck  :-+

I was thinking of going for something like this:

https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/

I'm sure these questions are pretty basic for you but what's the USB Blaster for?   From what I've read, they're for Altera devices.  For programming, debugging and emulation.   Anyway, for the USB Blaster, do you think this would be a nice one?

https://www.buyaltera.com/PartDetail?partId=5638362

It's the Altera USB Blaster II
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #22 on: December 31, 2015, 11:52:01 pm »
Buzz out = continuity test on your DMM. Are you sure you are up to this? It is not an easy job. All the dumping the firmware using JTAG and stuff is the easy bit. Reverse engineering the code is another matter!

I want to try Macbeth.   I know I don't understand everything and will probably fail miserably but I love learning and I really want to try very hard.   I look at it like this, worst case, I fail but I will still learn something in the process.   I used to be pretty good at writing code, back in the day.   I was a system programmer and worked for a corporation called Deposit Computer Services, Inc until 2005 or so.   My ability to write code is a bit rusty.   I got a few good books on C now though.   C Programming - A Modern Approach - 2nd Edition by K.N. King and then I have the Red Dragon Book (AKA, Compilers - Principles, Techniques and Tools).  Thanks for all the help though.   I greatly appreciate how everyone's been so helpful and understanding.

For reverse engineering programming knowledge helps (a lot), but it's only a small part of the skillset required. You don't need to be able to write code so much as to read assembly language and relate what you're reading to what the C/C++/whatever compiler spits out. You also need a good disassembler and at least some knowledge of the CPU.

If you have no experience in it, you should be able to find a lot of information and tutorials online. It doesn't really matter what processor or languages they're for. I'd suggest starting by disassembling test programs for your desktop computer. Processors and compilers all work in more or less the same way so skills gained on one are usually easily related to others, and it will be a lot easier to try things out and see what's going on with your computer than an embedded thing.

Good luck, it's a pretty large can of worms that you are opening ;)

Thank you for the information.   I know a little bit.   I know I need a way to disassemble the firmware once I dump it using the JTAG stuff.   I need a disassembler that can understand the i.MX283 ARM927EJ-S instruction set.  I know I need to learn this instruction set but I figure it probably wouldn't be a crazy hard thing to learn.  I used to have this little MP3 type player called an Archos and that had an ARM processor of one sort or another inside it.   I didn't think it was that hard learning the assembly for it but it was an older ARM processor.  I know with the PICs I've been playing with, the instruction sets are small.   The PIC I'm playing with now (PIC16F628A) only has something like 54 instructions.    I figured everything would be done in assembly.   Once my wife is done fixing this tablet in the work room, I'll fire up my Linux box and install OpenOCD.   Hopefully there's some sort of emulator out there where I can play with the ARM9 code on my machine and compile some test programs and fire up GDB (or whatever equivalent the ARM9 toolchain comes with) to play around with them.

The hardware, for me, is the hardest part.   I just started learning how to make circuit boards and don't have much experience in that area at all!   I made a device that counts in binary (up and down) when you press a button!   It lights up LEDs to show the binary number.   I've written code most of my life and I've played with assembly on and off.   After the Marine Corps, something happened to my brain and things got a bit messed up.   Had to take a break for a bit but I'm ready to learn everything I can now.

I think it's going to be fun once I get the hardware to dump the firmware directly.   I shouldn't have to worry about the GEL files then.
 

Offline Stupid Beard

  • Regular Contributor
  • *
  • Posts: 221
  • Country: gb
Re: Need help hacking DP832 for multicolour option.
« Reply #23 on: December 31, 2015, 11:55:42 pm »
qemu is the usual emulator. There should be packages in whatever linux distro you use.
 

Offline Spork SchivagoTopic starter

  • Frequent Contributor
  • **
  • Posts: 387
  • Country: us
Re: Need help hacking DP832 for multicolour option.
« Reply #24 on: January 01, 2016, 08:15:27 pm »
So I ordered the ARM-USB-OCD-H made by Olimex.   I also ordered a 20-pin to 10-pin adapter from them.   I reread what I wrote the other night and wanted to clarify right now.  I didn't mean to down play how hard the software part of this was going to be.   I know once I get the firmware, it's going to take a very long time for me to analyze it and figure out what exactly everything does.   What I was trying to convey is I believe I understand the software part of this project and know what exactly needs to be done, whereas with the hardware, I'm a bit confused.   I don't really understand what the USB Blaster's for if I have the JTAG device from Olimex.   Does it just allow me to do in-circuit debugging or something?  Once I get my ARM-USB-OCD-H device, I'll rip apart the power supply and buzz those pins in the picture.   They're the ten pins above the CPU and to the right a little, near the edge of the board, right?   Thanks!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf