Nexus 7 USB Webcam with Torque Track Recorder

I’ve never wanted to embed a tablet in my dash more than I do right now.

While browsing reddit a couple days ago, I came across this post about using a USB webcam with an OTG adapter.

Which lead me to this page about Nexus 7 webcam.

I am a huge fan of Torque OBDII reader for android (Torque Pro) with Torque Track Recorder. It kinda sucks on my original Motorola Droid so I wanted to get it working on my Nexus 7. Which got me really excited about hooking up a webcam to my nexus 7. (I currently have an iPhone 4 so that’s not an option)

So I rooted my nexus 7.

A couple Google searches later, I was reading about swapping cameras on android. This was really helpful to know to look for nvcamera.conf

which lead me to this google+ post about usb=/dev/video0 in nvcamera.conf


Once i knew what I was modifying, I had to mount /system as rw
mount -o remount rw /system

A reboot later and I was looking at myself through a USB webcam in Torque Track Recorder

I’ll export video tonight. I wasn’t expecting to see wifi sync!


# format, cameraName=device,direction,orientation,type
# type can be ‘stereo’ for stereo capable, ‘mono’ for not stereo capable,
# ‘usb’ to enable searching for a usb device and where to put it in the list
# if found. Lines must be shorter then 256 characters
camera0=/dev/mi1040,front,270,mono // front camera

The RIPINATOR – Semi-automated DVD Ripping

The Ripinator!!!

My fiance and I have a stack of DVDs. They’re dusty and inconvenient. I wanted to rip them to my network storage so I can easily watch them from my Boxee Box. It’s not that I’m lazy, but I hate doing repetative things if I can automate it.

I’m using Perl with Win32::SerialPort to control the autoloader. I’m using Win32::DriveInfo to get the volume name of the DVD. I’m using TMDB on the off chance the volumename will pull up the movie. I’m using DVDFab 8 to rip mainmovie to an ISO file. I’m using Handbrake to encode to iPad preset. In my testing, this looks just as good as the ISO file and uses only 20-30% of the space.

To use I batch together either all movies, or all TV shows. I rip my movies into my mapped network drive, V:queue and my TV shows into V:TV_queue
I have my faster computers actually do the encoding. Multiple computers. I map the V: drive to the same fileshare. I encode my movies to V:Encoded and my TV shows to V:TV_Encoded



  • Windows
  • Perl
  • Perl Modules – install through Perl Package Manager
    • Win32::SerialPort
    • Win32::DriveInfo
    • TMDB
  • DVDFab 8
  • Handbrake
  • nircmd
  • A big stack of DVDs
  • A large hard drive

Main program. It requires gripper, ripper, and traycmds. I broke this into multiple pieces to make it easier for me to keep track of.
Enumerates all CD/DVD drives attached to the computer and iterates through them probing the gripper arm to each tray. If a tray is detected, the drive number and drive letter are noted.
It then checks the levels of the bins.
If there are discs in the desginated input bin, it will load them into the drives and start the script
If there are discs done ripping, it will unload them into either the reject bin, or the output bin, depending on the exit code
This will continue until either something crashes, a disc is completely unreadable, or there are no more discs left to rip.
Contains subs
Required Setup:
Set COM port on line 218

Returns the version of the autoloader’s firmware
returns the serial number of the autoloader
moves the gripper arm to the top of the unit
Queries the autoloader’s status. See command notes for more info
Gets the current position of the gripper arm
gets a disc from the specified bin
puts a disc in the specified bin
gets a disc from the specified drive
puts a disc in the specified drive
probes the gripper arm to the disc tray, returns drive number
sends a command to the autloader. see command notes for more info
Contains subs
Required Setup:
Put nircmd in C:nircmdnircmd.exe

@allDVDdrives = closeAllDrives()
Closes all CD/DVD drives. Returns an array of all the CD/DVD drives attached to the computer.
Closes the specified drive
opensthe specified drive
gets the volume label of the specified drive
perl $drive $tray
Rips DVD to specified location. makes and removes lock files for ripinator. Looks up TMDB, if available, uses moviename and year for filename, if not, uses volumename.
Required Setup:
Get an API key for TMDB
set $dest_dir where you want ripped DVD ISO files to be stored
set $dvdfab as path to dvdfab.exe
enter TMDB API kay on line 96
perl !e1C
Allows sending commands to the autoloader
Encodes ISO files to iPad preset m4v with handbrake.
Required Setup:
Set machine name, path to handbrake, source and destination folders.
Encodes ISO files to iPad preset m4v with handbrake. Splits each title into a separate file.
Required Setup:
Set machine name, path to handbrake, source and destination folders.

Back Story:
A few years ago, we had a Rimage DVD production robot at work. I dubbed it Trogdor the Burninator. Rimage had some pretty scummy practices… The ink cartridges are standard HP cartridges, but had a little tag in the label that will keep the software from loading if you don’t buy the Rimage branded cartridges. I’m sure they would have gouged even more if they could think of a way to do it. So we replaced it with a newer, nicer one from Primera. It was an improvement in pretty much every way. I got the old one since no one else wanted it. SCORE!

I took it up as a project again. I had saved the old software from Rimage and was able to get it to run for 30 days between wiping and reloading the computer it was attached to. This was enough time to determine that the connection between the printer and the RAS 13 autoloader was RS232 serial. I sniffed the traffic between long enough to figure out which commands did what, and what replies meant. This is by no means definitive, but it’s enough to use an otherwise useless piece of equipment.

Rimage DTP-4500 RAS 13 Serial Port Cable

I suppose this post is a little out of order. It should have preceded Rimage DTP-4500 RAS 13 Initialization Sequence

I had popped the side off my RAS 13 and looked at the port that had been used to control the autoloader. It was a mini din 8 pin port. It was connected to a serial level converter chip. I took this as a sign it used RS232. There were 4 pins actually connected to the chip, 1, 2, 3, and 8. Pin 5 was connected to ground. Picture: Control PCB inside RAS 13

Some trial and error with the breadboard. Picture: Messy Breadboard

Once I had the proof of concept, I wanted to order some connectors to make it a little tidier.

Diagram of cable connection. Note: both ends are looking into male connectors. Check out my Skills of an Artist!

Connectors are pretty easy to find. I ordered from mouser and sparkfun since I was ordering other stuff too.

Perl One-Click DVD Rip with Win32::DriveInfo andDVDFab 8

Continuing my current obsession with ripping DVDs is my perlification of jmos1277’s Automated DVD ripping script using DVDFab

I’m using DVDFab to rip since it doesn’t seem to get tripped up as often with weird copy protection crap.

Luckily, Win32::DriveInfo will give me the volume name of the DVD. If I get time, I’ll rewrite so it checks for duplicates and appends the date&time to get a unique filename for output. It’s a little annoying when 3 discs are all named “DVD_VIDEO”.

I’m not setting it as an autorun action for the DVD drive because I’m going to call it from the ripinator script.

ripdisc.plContinue reading “Perl One-Click DVD Rip with Win32::DriveInfo andDVDFab 8”

Rimage DTP-4500 RAS 13 Serial Control Commands

A continuation of one of my previous projects.

Each command starts with the nonprintable ascii character ESC (x1B) and ends with a capital C.
Each reply starts with the nonprintable ascii character ESC (x1B) and ends with EOT (x04). Since that looks pretty ugly in a terminal, I replace ESC with a + sign and the EOT with an = sign.

In the known command list, the commands aren’t indented and the known replies are indented.

I smacked together a little bit of perl to verify I was understanding the commands correctly.
Continue reading “Rimage DTP-4500 RAS 13 Serial Control Commands”

DSL Woes

One of the drawbacks of living outside of city limits in Iowa… Internet connectivity is an issue. Century Link (formerly Qwest) is the telco for the area and our ISP. The service has never been stable, or even close. If good fortune was smiling upon us, it would stay connected for 6 hours or so. I think it was more normal to get 15-90 minutes of internets at a time. A tech did look at our connection, and things have improved, but it’s still not great.

I wanted to test the house wiring before blaming the ISP or the house. Luckily CenturyLink has a support page on exactly this topic.

Unplugged the house and plugged directly into the line feeding the house.

Continue reading “DSL Woes”

Beyond Logic Serial Analyser Log Printing

This was a quick hack with some perl to chop up the logs and spit out the results I wanted.

This is not normally something I would share, but I want to be able to find it again, should I have a need for it. The first one replaces the non-printable characters and separates the transmit and receive lines to improve printed readability.Continue reading “Beyond Logic Serial Analyser Log Printing”

Rimage DTP-4500 RAS 13 Initialization Sequence

Initialization sequence for Rimage RTP-4500 RAS 13 autoloader duplicator robot.

Serial sniffing with Beyond Logic RS-232 Protocol Analyser in ASCII mode.

For interception, I made a cable with 2 8-pin mini din connectors wired straight through after patching through a solderless breadboard. Connection to PC is 38400-8-N-1 using hardware flow control. I will post pinout and diagram later. For now, Pictures of the hardware and connections. Rimage Serial Sniffing – Second Attempt

Video recorded using Blueberry software BB FlashBack Express.

Logged output from the rs232 protocol analyser has been reformatted with a bit of perl to make reading easier. I chose 80 chars for the column width because it matches what the protocol analyser displays in the video. Each line is broken into two lines. The first line is what’s sent from the computer/printer to the autoloader. The second line is the response. To make things printable, I replaced the ASCII ESC character (hex x1B) with a plus + symbol and the ASCII EOT character (hex x04) with an = symbol.

So far, it seems all commands and replies start with ESC! and all replies end with EOT. Log file from initialization follows.Continue reading “Rimage DTP-4500 RAS 13 Initialization Sequence”