VCM2 Hacking
How to change VCM2 serial number, enter test mode, and get a root shellI have figured out how to change the serial number of the VCM2 as well as enter test mode, and get a root shell on it. You'll need a microSD card for this to work.1. Use IDS 86.2. Recover your VCM2.a. Describing how to recover is beyond the scope of this post. Search the forums for instructions.b. After recovery your VCM2 should be at VCM2 FW version 2.1.1.5.3. Wait about 90 seconds after the VCM2 beeps before proceeding. We are waiting for the SD card to be populated.4. Unplug the VCM2 and eject the SD card.5. Mount the SD card with a linux machine.6. On the SD card open 'apps/vci-diags/hwtest-scripts/self-test.sh' for editing.7. Add the following line to the file:touch /etc/vci/config/testmode8. Cleanly unmount the SD card and insert it back into the VCM2.9. Plug the VCM2 into the computer and wait 90 seconds past beep before proceeding.10. Launch IDS.11. Go to system utilities
12. Select 'Launch Monitor Tool' and confirm on the pop up.13. Select 'Run System Diagnostics' > 'Next' > 'Test a VCM II Module' > 'Next'
14. Once the test completes unplug, wait a couple seconds, and then re-plug the VCM2 into the computer.15. Wait about 15 seconds past when the VCM2 beeps and point your browser to http://192.168.171.2
You are now in the test mode web server.a. To set a new serial number select 'Set New Serial Number' and proceed with serial number setting.The default serial number is: 1211-31605352b. To get a root shell Telnet to 192.168.171.2 you will be dropped to a root shell without providing login credentials.c. To stay in testmode at next reboot select 'Set Repair Test Mode'. This has to be done once per boot or you will have to go through this whole process to re-enable test mode.
Here Be Dragons:To those who would go poking around, tread carefully. I accidentally ran cgi-bin/total-reflash and wiped my VCM2.My bootloader was still intacted and available on pins 24 & 25 of the HDL26-PL-B connector.
RS-232 SERIAL ACCESS
The serial console is available on pins 24 (Rx), 25 (Tx), & 26 (Gnd) of the HDL26-PL-B connector. The connection is 38400 8-N-1 @ RS-232 levels.Make sure to use pin 26 for ground and not the shield. The shield floats and wont produce a usable connection.
U-Boot 1.3.0 (Jan 14 2011 - 17:19:53) ETAS VCI (r68531)RAM Configuration: on-boardBank #0: a0000000 64 MBHW Configuration: (0x1) VCI STD variant 0x1 with SMSC9215IFlash: 32 MB*** Warning - bad CRC, using default environmentIn: serialOut: serialErr: serialHit any key to stop autoboot: 0$ help? - alias for 'help'askenv - get environment variables from stdinautoscr - run script from memorybase - print or set address offsetbdinfo - print Board Info structureboot - boot default, i.e., run 'bootcmd'bootd - boot default, i.e., run 'bootcmd'bootm - boot application image from memorybootp - boot image via network using BootP/TFTP protocolclock - display or set processor clock speedcmp - memory compareconinfo - print console devices and informationcp - memory copycrc32 - checksum calculationdhcp - invoke DHCP client to obtain IP/boot paramsdispgd - get info on mmc(sd) carddmamove - memory to memory move using DMAecho - echo args to consoleerase - erase FLASH memoryexit - exit scriptext2load- load binary file from a Ext2 filesystemext2ls - list files in a directory (default /)fatinfo - print information about filesystemfatload - load binary file from a dos filesystemfatls - list files in a directory (default /)flinfo - print FLASH memory informationflock - physical lock of Strataflashfunlock - physical unlock of Strataflashgo - start application at address 'addr'help - print online helpicrc32 - checksum calculationiloop - infinite loop on address rangeimd - i2c memory displayiminfo - print header information for application imageimls - list all images found in flashimm - i2c memory modify (auto-incrementing)imw - memory write (fill)inm - memory modify (constant address)iprobe - probe to discover valid I2C chip addressesitest - return true/false on integer compareloadb - load binary file over serial line (kermit mode)loads - load S-Record file over serial lineloady - load binary file over serial line (ymodem mode)loop - infinite loop on address rangemacaddr - display or store MAC address in Strataflashmapadd - add a memory map itemmapdel - delete a memory map itemmapinfo - display the memory map informationmd - memory displaymm - memory modify (auto-incrementing)mmcinfo - get info on mmc(sd) cardmmcinit - init mmc cardmtest - simple RAM testmw - memory write (fill)nfs - boot image via network using NFS protocolnm - memory modify (constant address)pinit - PCMCIA sub-systemprintenv- print environment variablesprotect - enable or disable FLASH write protectionrarpboot- boot image via network using RARP/TFTP protocolreset - Perform RESET of the CPUrun - run commands in an environment variablesaveenv - save environment variables to persistent storageserialnum - display or store serial number in Strataflashsetenv - set environment variablessleep - delay execution for some timetest - minimal test like /bin/shtftpboot- boot image via network using TFTP protocolusb - USB sub-systemusbboot - boot from USB deviceversion - print monitor version$
BACKUP SD CARD
dd bs=512 if=/dev/mtd0 of=/mnt/sd/mtd0dd bs=512 if=/dev/mtd1 of=/mnt/sd/mtd1dd bs=512 if=/dev/mtd2 of=/mnt/sd/mtd2dd bs=512 if=/dev/mtd3 of=/mnt/sd/mtd3dd bs=512 if=/dev/mtd4 of=/mnt/sd/mtd4dd bs=512 if=/dev/mtd5 of=/mnt/sd/mtd5dd bs=512 if=/dev/mtd6 of=/mnt/sd/mtd6dd bs=512 if=/dev/mtd7 of=/mnt/sd/mtd7dd bs=512 if=/dev/mtd8 of=/mnt/sd/mtd8dd bs=512 if=/dev/mtd9 of=/mnt/sd/mtd9dd bs=512 if=/dev/mtd10 of=/mnt/sd/mtd10dd bs=512 if=/dev/mtd11 of=/mnt/sd/mtd11dd bs=512 if=/dev/mtd12 of=/mnt/sd/mtd12
I was able to restore my VCM2. If you find yourself in the same situation:
1. Download and use ExtraPuTTY (Use Ymodem mode for transfers)
2. Download baner's firmware from post #16
3. Connect to the serial bootloader as detailed in post #5
4. Run the following commands one group at a time and using the corresponding mtd partition (list below). You'll need to follow the onscreen prompts.
Code:
setenv baudrate 115200; funlock; saveenvmw.b 0xa2000000 FF 0x01400000; loady 0xa2000000; funlock; protect off fpga; erase fpga; cp.b 0xa2000000 fpga 0x000a0000mw.b 0xa2000000 FF 0x01400000; loady 0xa2000000; funlock; protect off linux2; erase linux2; cp.b 0xa2000000 linux2 0x00180000mw.b 0xa2000000 FF 0x01400000; loady 0xa2000000; funlock; protect off initrd2; erase initrd2; cp.b 0xa2000000 initrd2 0x00600000mw.b 0xa2000000 FF 0x01400000; loady 0xa2000000; funlock...
duczyk