Pipe Dream

August 27, 2006 at 1:27 AMJoshua Harley

Right well, it's not really a pipe dream... not even close, but it was a cool name anyways because I've learned how to use named pipes! Woohoo! I'm sure none of you know what those even are. Since using sockets is unbelieveably hard (for me at least, haven't found enough good information yet) in programming I turned towards another network aware system. They are called named pipes which programs access (and provide) them using the style of \\.\pipe\pipename or \\computer\pipe\pipname. Kind of neat isn't it? Once I got down transfering some basic text down the pipe, it stepped it up one notch... without using any tutorals this time - just pure knowledge and frustration. I have taught myelf how to transfer structs between programs. A struct is variable that groups together other variables (simple definiton). If you want a more comprehensive definition just visit this wiki article. What's really neat is it lets me pass just one variable that holds others inside... and I can also write functions inside of the structs to manipulate their data (not usually necessary). I guess something notable is that a struct can hold many different datatypes inside of them. Here is an example:

typedef struct tagSample {
int nValue;
TCHAR szString[100];
DWORD dwFlags;
BOOL bReadyToSend;

In that example the struct SAMPLESTRUCT defined four different data types: a number (int), a string (TCHAR), another number (DWORD), and a true/false (BOOL). To other functions that accept a struct (usually will accept anything) I can just pass a samplestruct. This makes life easier since I can connect and send once rather than connecting and sending four different things. My only worry right now is that I don't know if named pipes will work on {li,u}nix machines.

I have to admit I am proud of myself for figuring this out. It only took a few hours of compiling and fixing the bugs.

Posted in: Programming


Step 1 Done!

August 20, 2006 at 9:19 AMJoshua Harley

Woohoo! Well, after working on the linux system for three days (off and on), I finally built the kernel to my system. You know, the last step in the LFS book? (www.linuxfromscratch.org) I booted the system after compile and for the first time ever - it booted successfully on the first run! That has never happened in my time using LFS! WOO! The whole thing boots in less than a minute - which is surprising since it is only a 366MHz machine. Now I have the bare minimums, just the absoulte CORE of a linux system. No fancy stuff, no remote stuff, just the basics to get it loaded and have a shell running. My next step tomorrow will be to boot off of Knoppix again and download and compile the tools and programs needed for me to get SSH running (in fact, other than the inital boot and using samba to get the packages copied over, the entire system was built through SSH, it was headless that entire time). Once SSH is going, the next few are (in no particular order) Samba, FTP, Apache, X, Audio Libraries (oo crap, need to find an ISA modem/sound card for my anime... if it can handle it), codecs for all different types of files, MythTV, and a few other things I can't think of yet. When I am done, this little thing is going to be maxed out! Here are its specs:

  • Genuine Intel Celeron 366MHz
  • 256MB PC100 RAM
  • 8GB Primary Hard Drive (installed as root)
  • 250GB Secondary Hard Drive (installed as /var/mythtv - for the recordings/live tv)
  • SMC EtherPowerII 10/100 NIC
  • ATI Radeon 7000 32MB (which runs the console at 1600x1200@85Hz by default - woo!)
  • Serial port adapter to communicate with the D10-200 receiver
  • (Pending) Parallel port adapter to use with an IR receiver for remote control
  • (Pending) Hauppauge WinTV-PVR-350 for video capture/output
  • (Pending) ISA Modem/Sound Card for CallerID and potential anime playing

Well, that brings you up to date on this little box, I just realized that I don't think the PVR-350 can play native linux sounds... only what is passed through it. Also I don't think its little CPU can handle playing of .mkv and .ogm files... but time will tell!

Posted in: Programming

Tags: ,

Oh yeah, my blog

August 19, 2006 at 11:37 PMJoshua Harley

It has been almost a month now since my last post... I almost forgot I even had a website here... A lot has happened believe it or not. At work we are implenting a Windows 2003 Active Directory (finally moving towards an all Windows environment! Wee!) and that has been going quite roughly. We seem to have most of the teachers logging on with a generic account until we can figure out a way to export the users from Oracle and import them into Active Directory. Student computers are now getting recloned and attached to the domain as well.

I have a few projects going on here at home as well. Well just one right now really... I am using the guide from www.linuxfromscratch.org (not the first time either!) I am building a dedicated system to run the open source MythTV program. For my tuner I hope to get my hands on a Hauppauge WinTV-PVR-350 for its MPEG2 encoding and decoding for TV out. Using this system my puny (donated) system of 256MB RAM and Intel Celeron 366MHz will be able to do its thing without much hassle (reported that its CPU usage will be around 5%-10% while watching live tv). To take care of the recording/live tv bit, I bought a cable (didn't have the parts available to make it myself) from www.dtvcontrol.com to be able to control my DirecTV D10-200 receiver from the computer! That way I can disable all on screen information and do recordings/live tv from MythTV!

Posted in: Programming

Tags: ,