Rss Feed
Tweeter button
Facebook button
Technorati button
Reddit button
Myspace button
Linkedin button
Webonews button
Delicious button
Digg button
Flickr button

Denny’s OpenBSD Newbies blog

December 1, 2009

bsdtalk180- OpenBSD Enthusiast Girish Venkatachalam

Filed under: openbsd — Tags: , , , — denny @ 10:30 am

Interview with my programmer OpenBSD bud Girish Venkatachalam.

Main Site for bsdtalk
Interview mp3 link
Interview ogg link

November 24, 2009

Absolute Minimal OpenBSD USB Image

Filed under: openbsd — Tags: , — girish @ 4:10 pm

Added another OpenBSD USB bootable image, a very minimal
1GB version without X and without a single package, just the
base install.

Absolute Minimal Version

November 18, 2009

Create Fingerprints Using Cksum

Filed under: openbsd — Tags: , , , , , , , , , , , , , — girish @ 6:39 pm

New article on cksum(1) on the site at: Cksum

November 17, 2009

Interfacing the Medical Transcription
Foot Pedal With Mplayer

Filed under: openbsd — Tags: , , , , — girish @ 12:24 pm

Those of you who are hearing mplayer for the first time
should certainly see this article.

It is the best multimedia application out there and it is
written in pure C. It is amazing stuff. A grand old project
with an amazing cornucopia of features.

Those of you who have not heard of the footpedal do
not need to worry. It is a footrest with three buttons
which you can press with the toe.
Here is a picture.

Foot Pedal

Foot Pedal

It connects via the 9 pin serial connector to the serial port
of the computer. Before we get to the technical details we
do need to know something about the medical transcription
industry.

Every technical problem needs a business goal to meet.
Sometimes it is not very obvious as in the case of academic
UNIX tools, but without having an appreciation of the real
purpose of the project, one cannot do well in business.
Technical solutions do not exist in isolation.

Medical transcription is the process of converting a doctor’s
voice recordings into English text. The doctor would have
spoken at varying speeds and with different accents. A
medical transcriptionist has the job of translating his spoken
words into the written word.

I am sure you can imagine that this is no easy task. The
transcriptionist has to listen to the dictation multiple times
at various speeds to figure out what on earth the doctor is
trying to say.

His/her fingers are typing the message in the audio, and you
wish to be able to rewind, pause/play and fast forward the
recording with the foot. That is where a footpedal comes in.
You can’t use the mouse or keyboard for this since the hands
are busy typing out text.

While the hand is typing the foot will be interacting with the
audio player to help the transcriptionist to accurately translate
the dictation into English text.

The footpedal is a passive device with no power and no moving
parts. There are 3 switches as you can see above. The left pedal
is connected to the DSR pin(8), the middle pedal is connected to
the CTS pin(6), and the right pedal is connected to the DCD pin(1).

I figured this out using a perl script given here.

use Device::Modem;

  my $modem = new Device::Modem( port => ‘/dev/tty00′ );

        /*
        if( $modem->connect( baudrate => 9600 ) ) {
            print “connected!\n”;
        } else {
            print “sorry, no connection with serial port!\n”;
        }
        */

        my %sig = $modem->status();
        for (‘CTS’,'DSR’,'RLSD’)
        {
                if($_ =~ /RLSD/) {
                       print “Signal DCD is: “, ($sig{$_} > 0 ? ‘on’
: ‘off’), “\n”;
                } else {
                       print “Signal $_ is: “, ($sig{$_} > 0 ? ‘on’
: ‘off’), “\n”;
                }
        }

The next thing to do was figure out a way to do this in C.
That was the hard part but I got there. Check out the code
in this page to interface with the serial port on Windows
and OpenBSD to recognize the pedal presses.

Okay now we are halfway through. We can recognize
the pedal presses. But how to interface with the
audio player?

Before that we have an even more important question
to tackle.

Which player should we use?

I started working on audacity but quickly realized that
it does not have the rewind and forward feature. Plus
I realized that most audio players don’t have this at all.
Except of course mplayer. But before that I considered
and rejected sox and vlc.

I looked at the mplayer input.c file, the way it interfaced
with the joystick and LIRC remote control. I know I could
copy the semantics and match it with key presses. I did the
project first on OpenBSD and then got it working under
Windows. It was a great project, I thoroughly enjoyed it.

All the code in beautiful syntax highlighted fashion with
black background is here.

However the work is not over yet. You need to recognize
the pedal presses with more care. Right now it is too
sensitive so to speak. It has to have some back pressure
and hysteresis. I need to understand the needs of the
medical transcriptionist better. I shall finish this project
and add these details later. At the moment, I can say
that the project is nearly over.

November 14, 2009

LiveUSB Image With OpenBSD

Filed under: openbsd — Tags: , — denny @ 2:29 am

My programmer friend in India who is also a co-author on
this blog has created two usb OpenBSD bootable images.
There is a 1Gb image and a 2Gb image. The instructions
and download links are at:

LiveUSB image with OpenBSD

Cheers!

Addendum:
There are 3 images now:

1. Minimal version for 1GB without X
2. Lite version for 1 GB with X
3. Full version for 2 GB

November 11, 2009

Ed Tutorial

Filed under: openbsd — Tags: , , , , — girish @ 1:33 pm

Added new tutorial on using ed, the venerable old Unix text
editor. Good thing to know if you ever get in a bind, like in
single-user mode.

Ed Tutorial

Give it a whirl. Like I said, it’s a good thing to know, at least the basics.

Cheers!

November 10, 2009

Small Conky Calendar

Filed under: openbsd — Tags: , , , , , — denny @ 12:41 am

I”m not a perl programmer and I’m sure my chances of having come up with this
on my own would be right up there with the classic example about the monkeys
with typewriters creating the encyclopedia! :-) I got it off this mailing list:

freebsd-questions@freebsd.org

cal | perl -pe ’s/^/ /;s/$/ /;s/ ‘”$(date “+%e”)”‘ /\['"$(date "+%e")"']/’

I plugged it into the bottom of my .conkyrc file like so:

${color green}${execi 360 cal | perl -pe ’s/^/ /;s/$/ /;s/ ‘”$(date “+%e”)”‘ /\[
'"$(date "+%e")"']/’} ${color}

BTW, the above is one line wrapped. It shows the current day enclosed in
brackets in order to highlight it. Nice touch.

Cheers!

November 8, 2009

Celebrate Freedom Nov 9 – Anniversary of the fall of the ‘Wall’

Filed under: Uncategorized — Tags: — denny @ 11:38 pm

Nov 9, 1989. That’s the day the damnable Berlin Wall came down!
Celebrate freedom around the world today! Thanks, ‘Dutch’, I will
never forget your words:

“Mr. Gorbachev, tear down this wall!”

November 7, 2009

Taking Desktop Screenshots

Filed under: openbsd — Tags: , , , , , , , , , — denny @ 4:18 am

I was Googling around the other night looking for graphics
help and ran across this site where I learned about some
X stuff I didn’t even know was there on my box:

Useful Things You Can Do with FVWM

Example of dumping the root screen using xwd, part
of the X Window System included with OpenBSD:
xwd -root -out file

Example of displaying the dumped image with xwud,
again part of the X Window System:
xwud -in file

Example of dumping the root screen & outputting it to
jpg format using xwdtopnm and pnmtopng, both
included in the netpbm port/package:

xwd -root |xwdtopnm |pnmtopng > file.jpg

Example of converting an existing screenshot taken with
xwd, using xwdtopnm and pnmtopng:

xwdtopnm < file | pnmtopng > file.png
xwdtopnm < file | pnmtojpeg > file.jpg

Example converting a screenshot taken with xwd with
convert, part of the ImageMagick port/package:

convert file file.png
convert file file.jpg

Conky Update

Filed under: openbsd — Tags: , , , — denny @ 1:40 am

Added some information at the end of Conky System Statistics on a new way
to stop one version of Conky from a script that runs from a cronjob and start
a new version, again from a script run from a cronjob. Hope if anyone used
the old way they didn’t run into the same problem I did. If so, sorry. The current
way has been working without issue for several days now.

Cheers!

Older Posts »

Powered by WordPress