config.js
- Configuration of the USB ports of your devices and relay numbersdevice.js
- Parse config.js and get the correct /dev/ttyUSB and relay number for a device by namerelay.js
- Controller for SainSmart (compatible) 16 line USB serial controlled relayserial.js
- Lib for allowing you to write expect-like scripts for interfacing with modemsutil.js
- Generic crapmemdump.js
- Read a range of memory in the bootloader, reset the relay if the device hangsparse_memdump.js
- Parse the output of memdump.js and generate CSV files of 16 pages each
This will dump and validate an image file of an mtd on the device. This can be used with a generic
image that offers mtd0
which covers the entire flash chip. This requires the device to have
hexdump
, sha256sum
, gzip
, and dd
(all available in busybox).
- Connect to the device with your terminal in logging to a file (e.g.
my_device_mtddump.log
) - Paste the content of
mtddump.sh
into a shell on the device - Run
mtddump
command on the shell - Don't press any keys, it will spoil the dump
- When it's complete, you will be back to a shell again (at this point, pressing keys is okay). Disconnect your terminal so you have the complete log file.
- Run
node parse_mtddump.js my_device_mtddump.log -o my_device_mtddump.bin
to reconstitute the data from the dump, if there is any problem, it will error out.
If parse_mtddump.js
completes successfully, you will have a complete image of the mtd from the