Home > Bash, Programming > Use Aleratec Roboracer CD/DVD duplicator under Linux

Use Aleratec Roboracer CD/DVD duplicator under Linux

This is the bash script that I wrote a while ago to control the Aleratec Roboracer CD/DVD Duplicator under Linux, which is not a supported platform by the manufacturer (standard features such as ejecting burning disks are supported, but not the loading part). Those control strings were obtained using USB sniffer [ http://benoit.papillault.free.fr/usbsnoop/doc.php.en ]. This script became an important part of an email backup application which archives daily emails and burns to the robotic duplicator without user interference.

#!/bin/bash
DEV=/dev/ttyUSB0
SR=`dmesg |awk -F ':' '/scsi3-mmc drive: 48x\/48x writer dvd-ram/{print $1}'`
DRIVE=/dev/$SR

w() {
    echo -e "$1" > $DEV
}

usage() {
    echo "`basename $0` -e    : eject the disc"
    echo "`basename $0` -l    : load the disc"
}

[ -c $DEV ] || echo "$DEV does not exist, please make sure\
 the duplicator is connected" && exit 1
case $# in
    1)
        case "$1" in
            "-e")
                eject $DRIVE
                sleep 1
                #turn handle a small angle
                w !BNKPG93
                sleep 1
                #turn handle back to origin
                w !BNKPH94
                sleep 1
                eject -t $DRIVE
                echo "disc ejected"
                ;;
            "-l")
                eject $DRIVE
                #turn handle a large angle
                w !BNKPB8E
                sleep 1
                #load disc
                w !BNKPH94
                sleep 2
                #turn handle back to origin
                w !BNKDP90
                sleep 2
                eject -t $DRIVE
                echo "disc loaded"
                ;;
            *)
                usage ;;
        esac
        ;;
    *)
        usage ;;
esac

Direct link to the script: http://rc3.fileave.com/robo.sh.
Aleratec Robo Racer

Advertisements
Categories: Bash, Programming
  1. August 10, 2010 at 5:24 pm

    Thanks for the bash script. A friend of mine is running Linux and has one of their machines. He’s going to try it out with his Roboracer.

  2. ricoch3n
    August 10, 2010 at 6:08 pm

    Hope it works for him/her. Please let us know how it goes.

  3. June 5, 2011 at 4:59 am

    Good web site! I truly love how it is easy on my eyes and the data are well written. I am wondering how I might be notified whenever a new post has been made. I have subscribed to your feed which must do the trick! Have a great day!

  4. July 4, 2015 at 5:29 pm

    I recently used this to take over my weekly duplication responsibilities as the software to do this (written for mac) was buggy and cumbersome. I was able to integrate this script into anonther script that encodes dvds and cds.

    Now I just start the script and walk away only to return the next morning with a stack of completed discs :)

    I know this is a little late but thank you for this great script!

    Kent Wyatt

    • July 4, 2015 at 5:41 pm

      No problem. Glad to know it helps :)

  1. July 21, 2009 at 2:37 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: