here's the guide to follow my steps to unbrick a DSOX2K after flash corruption.
I received the scope with a frequent failure, that is:
green lights near the buttons (ref. to serial) light on in sequence, then RUN/STOP and SINGLE light on, and stay. At this point, the scope doesn't respond and stay forever. The failure repeats exactly the same way, same timing, every time you turn it on.
The procedure. (using my old lab PC, running Win7, and a cheap prolific-based USB to serial cable)
open the scope, and connect a 3.3V level serial cable as depicted here:
https://www.eevblog.com/forum/testgear/dsox2000-and-3000-series-licence-have-anyone-tried-to-hack-that-scope/msg260895/#msg260895(Thanks FrankBuss)
In my unit, the connector is in a different position and rotated 90º. If it happens to you, it's very easy to locate the ground pins with a multimeter then and count, the pins scheme is the same.
You could test the connection with PuTTy @115200,8,N,1, but I recommend to download TeraTerm for later use of YMODEM.
You can locate TeraTerm here:
https://osdn.net/projects/ttssh2/releases/or just google
Tera Term downloadNote: I tried first with ExtraPuTTy, but (at least in my computer) it hangs during the binary transfer, after 20 minutes or more! a real pain.
If your connection works, you should get something like:
U-Boot 2010.03 (Jan 26 2011 - 12:37:34)Agilent P500
CPU: SPEAr600
DRAM: 128 MiB
Flash: 512 KiB
NAND: 128 MiB
In: serial
Out: serial(...)
it continues until giving you a CRC error or something that aborts your booting process (that's the problem, right?)
Turn off the scope and forget it for a while.
Download a firmware v2.35 from here:
https://cal.equipment/doc/HP_Agilent_Keysight/DSOX/(thank to Alanme, the "donkey"
)
...many posts say that this is the last version that boots from the USB, it's mandatory because your flash is corrupted.
Decompress it with 7-Zip or whatever application that can deal with .cab files
You will need two files from here:
nk.bin.comp, to get the kernel image and recover the WinCE
infiniiVisionSetup.cab, to get the oscilloscope application
Download the tools from here:
https://www.eevblog.com/forum/testgear/dsox2000-and-3000-series-licence-have-anyone-tried-to-hack-that-scope/msg1035636/#msg1035636(thanks PA0BZ)
or simply use my own set, attached below.
Following the instructions from FrankBuss, modified by
me:
use
bincompress.exe to get nk.bin from nk.bin.com
X:\yourfolder>bincompress /d nk.bin.comp nk.binthen use
viewbin.exe to get the info from nk.bin that we will use later
X:\yourfolder>viewbin nk.binViewBin... nk.bin
Image Start = 0x80361000, length = 0x013064D4
Start address = 0x80362000
Checking record #24 for potential TOC (ROMOFFSET = 0xFF010694)
Checking record #39 for potential TOC (ROMOFFSET = 0xFF1126A4)
Checking record #144 for potential TOC (ROMOFFSET = 0x00000000)
NOTICE! Record 144 looked like a TOC except DLL first = 0x4001C001, and DLL last
= 0x40C4C094
Done.Using the data we got from viewbin.exe, convert the nk.bin in the nk.nb0 (the binary) with
cvrtbin.exe, to be uploaded later
X:\yourfolder>cvrtbin.exe -r -a 0x80361000 -w 32 -l 0x013064D4 nk.binThis will result in a
nk.nb0 in the same folder. Check it and remember the location.
Run
TeraTerm with the same serial port parameters, 115200, 8, N, 1
Place something heavy, or your finger, on your keyboard space bar and turn on the scope. This will interrupt the bootloader (das U-boot), showing a prompt:
U-Boot 2010.03 (Jan 26 2011 - 12:37:34)Agilent P500
CPU: SPEAr600
DRAM: 128 MiB
Flash: 512 KiB
NAND: 128 MiB
In: serial
Out: serial
Err: serial
SerNum:serial number not programmed
Chip: BD Board Rev: 4
Net: smsc
Press space to stop autoboot: 0
p500>Now use the
loady function, if you're curious, use the U-boot help first:
p500> help loady
loady - load binary file over serial line (ymodem mode)
Usage:
loady [ off ] [ baud ]
- load binary file over serial line with offset 'off' and baudrate 'baud'
at the prompt, type
p500> loady 0x0361000 115200Note from FrankBuss: In case you wonder about the 0x80361000 and 0x361000 difference: this is because of physical and virtual memory addresses. Fortunately, the mapping is really easy in this case.
you should get this:
## Ready for binary (ymodem) download to 0x00361000 at 115200 bps...
CCthe CCCC will continue until you start to send a file, or a timeout happens after a couple of minutes, maybe.
In Tera Term go to
File->Transfer->YMODEM->Send... and open the
nk.nb0 that you have prepared before
This process is about 45 minutes long, keep in mind that YMODEM is a fast protocol, but the serial connection is 1000 times slower compared with a 100BaseT
The time consumed by the transmission must be enough to prepare the USB.
There are specific tools mentioned in old posts, to extract the files from infiniiVisionSetup.cab, that I was unable to find (like WinCE CAB Manager 3.0)
Fortunately, in the PA0BZ tools.zip, there is a Python script that to the job, in a tricky way that works for me
the steps are:
1- Decompress infiniiVisionSetup.cab into an empty folder, you wil get many files with scrambled names, don't worry.
2- copy dosetup.py into the same folder
3- run
python dosetup.py or simply double click on dosetup.py if the .p extension is already assigned (in any case, you need Python 2.x.x installed)
Just in case you need it, the instructions are in the readme.txt in the same tools.zip
Now you have the contents of infiniiVisionSetup.cab exploded in a tree. The next step is to copy this folder and its contents to the USB pendrive, following the structure found here:
https://www.eevblog.com/forum/testgear/dsox2000-and-3000-series-licence-have-anyone-tried-to-hack-that-scope/msg364171/#msg364171It's simple, just:
1- copy the contents of the
Secure folder in your USB root.
2- copy the
Temp folder in your USB root. (I don't know if it's really necessary, perhaps a guru can tell me "the truth")
3- make a folder name
Startup in your USB root.
4- create a file inside the folder Startup, named
infiniivision.lnk, containing
48#\Secure\infiniiVision\infiniivisionLauncher.exe 5- create a file in your USB root, named
infiniivisionStartupOverride.txt, containing
True 6- copy the complete cab AS-IS (I used 3000XSeries.02.35.2013061800.cab) that you downloaded before in your USB root
the last point is
mandatory because once you get your scope resurrected, you must reflash your flash, using the scope utilities, like if you were updating the firmware!
For instructions, go to the Keysight site. You must go anyway later...
(credits for 4 and 5 to plesa, from his several posts about how to start the scope from a USB drive)
Remove safely your USB and plug it into the scope (I used the front panel USB, I don't know if rear USB do the same)
Return to Tera Term, that was transferring the nk.bin...
At the end of the transfer, your screen should show:
CCCxyzModem - CRC mode, 1(SOH)/19482(STX)/0(CAN) packets, 5 retries
## Total Size = 0x013064d4 = 19948756 Bytes...right after the last C, without any CR/LF
Check if the bytes received are the same, in this case
0x013064d4The last step: Use the
go U-boot command to execute the kernel just downloaded
Cross your fingers, pray, say thanks to James Clerk Maxwell, or whatever your belief recommend, and type at the prompt:
p500> go 0x00362000The terminal should start echoing a long list of messages, starting with...
## Starting application at 0x00362000 ...
Windows CE Kernel for ARM (Thumb Enabled) Built on Jan 24 2013 at 14:52:37
Setting up for a Cold Reboot
Done Setting up for a Cold Reboot
Windows CE Firmware Init(...)
396 lines after the "go" command, you should see the last line:
-----> InfiniiVision is running <-----and your scope is running!
Before turning off the scope,
remember to update to 2.35 from the .cab already copied in your USB drive!
Several guys here recommend updating to the last version (as I did) to avoid another flash corruption.
To get the guide for updating, go by yourself to the Keysight site.
that's all folks
Thanks to: FrankBuss for the instructions to convert nk.bin.comp in nk.nb0, and for uploading the serial port picture
PA0PBZ for uploading the nk tools and recommending to use 2.35
travisc for cleaning up and sharing the correct structure to get a bootable USB
plesa for sharing so many examples about the .cab and .lnk, impossible to name them one by one here
TheSteve, for remembering to put the full .cab in the USB, to update after the resurrection
sorry if I forgot someone between the hundreds of inspiring posts, I come from the era of embedded systems with 2Kbytes of EEPROM and 256bytes of RAM, my memory is not as big as needed to remember you all
P.S.: some of the tools and ideas were taken from here
https://forum.xda-developers.com/showthread.php?t=656086