carpal tunnel
Registered: 29/08/2000
Posts: 14507
Loc: Canada
|
Quote: Hmm... so recording everything isn't that much data. That's good, and simplifies things. But yeah, I forgot that the empeg keeps the hard drives read-only, and spun down most of the time. I guess there's probably a way to hold the data in memory until a certain amount has been recorded, then write it in chunks to the hard drive. That would help with keeping the drive from spinning all the time, which wouldn't be good for it. How much memory is there for apps to use? Probably not much. As for the R/W thing, that's a bit trickier...
The whole job can be done with a moderate bash shell script running on the empeg. You can use the Hijack ;@EXEC_ONCE feature to (re)launch it at boot. The script could create a ramdisk device, and then use dd to copy from the serial port to a temp file on the ramdisk.
Each time the file hits a defined size (eg. 1MB, determined by parameters to dd), the command would exit, and the script would then continue: remount the disk RW, use cat to append the temp file's contents to a master log file, and then set the disk back to RO, nuke the temp file, and loop again.
The tricky bit is ensuring the drive gets set RO before any power-off of the player, as otherwise a possibly lengthy fsck will cripple it at next boot. There's a config.ini setting somewhere that controls power-off after the ignition turns off, and one could tie into that.
This could take a couple of hours for a reasonable UNIX script writer to get working correctly.
Me? I just use a laptop for stuff like this! 
|