The frustrations of Linux (UPDATED)

If Linux really wants to see itself installed on the average Joe’s home computer, it HAS to be better than it’s counter-part, Windows. As an OS (Operating System), it IS — it’s light-years ahead of the Windows architecture, IMHO. However, there is a side to Linux that is SERIOUSLY lacking — error and system messages — they SUCK large.

Now, I don’t claim to be a super-user, but I do my fair share of computing — from websites, to blogging, to programming, to just plain old web-surfing — I’ve used my fair share of computers, right on up from the TRS-80. Accordingly, I am not in the “{whatever} For Dummies” category either. I’m “above average”, as far as the general public would be concerned, simply because of the time I spend on computers. I’ve seen my share of error messages, let me tell you. So, if I’m complaining about them not being descriptive/helpful, what do you think the general public is seeing?

On to the problem…

Junebug USB PIC Laboratory

Well, I thought I’d start an Electronics section on my little blog, for those of you interested in electronics as a hobby, or just wish to read a little about embedded devices, such as the PIC Microcontroller, to gain a little insight as to how they work. So, with the need to start somewhere, let’s start off by taking a look at the Junebug — a USB PIC programmer and debugger (ICD – In Circuit Debugger), from BlueRoomElectronics.com.

 


Click the image for a full size view

 

I’ve had my Junebug for just over a month now, and I love it. I also have the Inchworm+/Unicorn combo, but the Junebug is far superior, IMO.

Let’s check out some of the features of the Junebug;

PICKit 2 Compatible Programmer / Debugger & UART tool
1. USB-B connector, provides power and communication for the Junebug, Tutor & target projects
2. Programmer status Power, Target Power & Busy
3. PIC18F2550 preprogrammed with .hex
4. 18F2550 ICP, expansion & PK2 compatible
5. Tutor mode switch see page 6 for details
6. ICD programming / debugging connector (2×5 type)

Yes, the Junebug is a PICKit 2 Compatible Programmer / ICD and fully supported by the Microchip software. This means that you can use the Junebug anywhere the PICKit 2 is supported, such as MPLAB, MPLAB C18 and the PICKit 2 software.

Not only can you program a wide range of PIC products, you can also use the Junebug as an ICD (In Circuit Debugger). For those of you, like me, that can’t afford a hardware simulator, the Junebug is perfect!

Click here for a list of products
that can be programmed/debugged with the Junebug

 

OK, so you can program, and debug your target boards/PICs, what project or board should you build first? Well, why don’t you have another look at the Junebug — it’s much more than just “a programmer” — it’s also a complete development board suited for so many projects and applications, well, let’s just say it will keep you entertained for many, many hours, without building a single PCB.

Let’s check out a few of the features from the TUTOR side of the Junebug;

PIC18F1320 Tutor / Trainer
7. USER I/O connector U5V,RA1,RA2,RA3,RA4,RB1(TX),RB2(RX),GND
8. 38KHz Infrared detector / demodulator enable with DIP switch IR IN
9. Reset or RA5
10. CON4 A3,A4,GND socket designed for iButton® / 1-wire®, and various small parts
11. VR1 & VR2 variable resistors on RA1 & RA3 (DIP switch selectable)
12. Six multiplexed LEDs
13. Pushbuttons on RB0, RB2 & RB5
14. PIC18F1320 for user programs and software development
15. CON5 designed for buzzers, servo motors, PWM and general I/O

Yeah, I’d say that’s enough to keep you busy! Start with the LED’s — learn how to light them up — flash them in patterns, back and forth — be inventive and experiment. Once the flashing of LED’s is understood, add in A/D conversion with the variable resistors (VR1/VR2) and make the patterns change with the pushbuttons.

Still a little too basic for you? How about an IR send/receive device (such as a TV remote)? What about PWM (Pulse Width Modulation) for servos/stepper motors — want to build a robot? You could add an iButton reader to it and design your own lock. Or maybe use the serial port for communications within a home automation project. The possibilities are only limited by your imagination.

OK, so that’s about it for this post — I hope that I have possibly encouraged you to join the world of embedded devices, get yourself a Junebug and start experimenting! A mind is a terrible thing to waste.

I’ll update this post as I add some code here so that you can play with the Junebug Tutor. If you want to check out the Junebug in more detail, or any of Bill’s other porducts, shoot over to www.blueroomelectronics.com.

What is it you want to know?

To my most recent guest, “Chicken Sh*t” (from the Ottawa, ON area — you know who you are)…..

So, ya decided to Google me, did ya? Heck, what do you want to know? I’ve never made any attempt to hide my identity (I did note that YOU posted here anonymously though).

I’ll help you out a bit;

1) the 7/8 year old you find in the White/Yellow belt Karate tournament in BC — not me (but my parents live about 20 miles from there, how weird is that?)

2) the address/business you find in Florida — no longer at that address either (phone numbers are bad too)

3) the ‘quote’ you find as being credited to me (some guy uses it on eBay) — not mine, but I have used it as I do like it (are you the one?)

4) thesafeguys.com — yep, my site — I am a Certified Master Safecracker

5) internet-locksmith.com — nope, no longer mine — and hence your “thief” comments, but we’ll get to that in a minute

6) the stuff you find from dragonflycms.com, myndworx.com, xtremethemes.com and other such places — yeah, I like to dabble in PHP programming every now and then

7) the reference to being a “Clearstar member from outside the USA” — no longer a member (hey, I’ve got my own sites!) — Wow! That was a while ago… still a Certified Journeyman Safecracker!

8) FireKing University and MBA references — just some of the places I’ve been trained at

OK, so I just got home from work — I’m hungry, and my dinner is far more important than replying to some guy (girl, kid — whoever you happen to be) Googling me, quoting things they find in an attempt to make me look bad. I have simply ‘unpublished’ your comments for now, but will be more than happy to repost them here (in the proper place mind you, not thoughtlessly placed amidst a thread that has nothing to do with your comments) and will do so later this evening.

Stay tuned! (UPDATED — read more — this is VERY LONG, be forwarned!)

The power of Linux

I have been an Ubuntu Desktop user for almost two months now, so let me update you a bit.

About a week ago, I made a HUGE mistake when running the command line as root (I can just imagine some of you grinning already). No, I was not using the rm command! That has to be the first line in every Linux book you read — WARNING!!! Then an example of wiping out your system with the rm command.

The ‘mistake’ I made, was not actually done on purpose — it was kind of a ‘wrong place, wrong time’ thing — let me explain. I was in the middle of copying some files to a new, shared directory that I setup to share with my LAN. This is when I had to ‘chown’ (CHange OWNership) the copied files — I started to type the command

sudo chown -R langroup:langroup /

when I was interrupted. Can you see it? The FULL command was going to be

sudo chown -R langroup:langroup /home/lan-shared

as I only wanted to change the ownership on that directory and it’s recursive directories (hence the -R option). But I turned around, after my interruption, and hit the enter key without completing the command.

I still wasn’t aware of what I did — it took about 4 or 5 seconds before I looked at the screen and saw it. Then, I realized what I had done! I had, inadvertently, issued a command, as root (sudo) to change the ownership (chown) of directories and files, recursively (-R), to the ‘langroup’ user and group (langroup:langroup), starting from the ROOT directory (/). Obviously, this is NOT what I wanted. :(

I quickly escaped the command (Ctrl-c), but it was waaaaay too late. Almost every directory and file on my system was now owned by ‘langroup’ — you can only imagine the havoc that wreaked.

It took quite a long time to get sorted out — I actually gave up on trying to save the system, but I wanted my files! The short and sweet of the recovery process was to boot the LiveCD in another machine and look at the directory structure and, more importantly, the ownership of the directories/files. From there, boot the machine I was having problems with from the LiveCD and get into recovery mode (ie. the command line — or ‘shell’). There you are root and can start changing ownership to what they should be — therein lies the time. Oh, my goal was simply to get network connectivity back so I could transfer my files. Or even get my CD writer back! Something to allow me to get my files. I ended up achieving network connectivity and was able to get my files.

I will now offer you a tip that would have saved my bacon, had I known it at the time. When installing Linux (any flavor) set yourself up a separate partition for your /home directory. Why? Simply because if you set it up in that manner, you save all your files to a separate partition on your hard drive. In the event of a serious problem, such as I have outlined above, you can simply reinstall the OS without touching (ie. without formatting) the /home partition. As an added bonus, you can install a newer version of the OS (say, for example, when Ubuntu Fiesty 7.x is released) as a clean install, and not an upgrade, if you so desire. The structure would be like so (keep in mind, this is for a single boot, Linux only machine — do a Google search if you need dual boot instructions);

Example — you have an 80G drive.

/ (root) ext3 — 10G
/home ext3 — 69G
/swap linux-swap — 1G

10G is plenty for the OS, and the 1G swap can be altered to your needs (depending on the amount of memory you have, etc.), but is a good base. Assign the majority of your drive to your home directory, as this is where the majority of files will be stored. Now, if you ever have to reinstall, you can choose NOT to format the /home partition and your data will be intact upon completion of the install.

This problem actually worked out better for me, in the long run — here’s why;

I initially installed Ubuntu on a P3 machine, and not one of my better ones, simply because I was testing the OS and didn’t know if I’d like it, or stick with it. I quickly found that I did like it, used it the most, and wished I had put it on a better machine. Part two of that is that I also wanted to install Beryl (a Linux Theme Manager — all kinds of cool stuff that’ll give any Vista user a run for their money!), but it just didn’t like the older hardware (especially the ATI video card!) and wouldn’t run.

Well, seeing that I now had to reinstall Ubuntu, now was the perfect time! Instead of reinstalling Ubuntu on that machine, I threw Window$ XP back on it as I still, unfortunately, need a Windows machine (no, I haven’t tried ‘Wine‘… yet!). From there, I copied all the files over from my current XP machine and then installed Ubuntu on that machine — a P4 3.2GHz dual core machine with 2G of ram, 2 x 200G SATA drives, yadda, yadda, yadda.

I’m happy to announce that Beryl installed without a hitch — and man, IS IT SWEET! Do a search for ‘Beryl’ over at YouTube.com — there are a bunch of videos there demonstrating Ubuntu & Beryl.

The moral to this post? The ‘chown’ command can be just as dangerous as the ‘rm’ command, if you’re not careful! ;)

Comment Policy

The rules here are simple. Abide by them and all points of view are welcome — do not and you are not welcome here. And since this is my blog and not yours, you don’t have a lot to say about it, do you? ;)

Spammers are stupid, stupid people — go away, spammer, you’re not welcome here.

1. Please stay on topic – if you’re not sure what the topic is, you shouldn’t be commenting.

2. Please refrain from using profanity – some users may be reading at work, others just don’t appreciate it.

3. Please refrain from personal attacks – there will be no tolerance for abuse/attacks on or against other users. Heck, say what you want about me, ya can’t hurt my feelings — however, one-liners such as “You’re a dick”, “Moron”, etc. will be removed without response. If you have something to say, say it — I will not remove any points-of-view if an honest attempt at an intelligent response is made.

4. Please do not feed the Trollscontact me and I will deal with them.

5. This is not a chatboard – if you wish to continue debate with another user, please get their email address or take it to another site (or cut me a cheque for the bandwidth!).

6. Please do not provide false email addresses – if you do not want to leave your email, leave it blank.

7. Please do not provide false URL’s – if you don’t have a weblog/site, or don’t want to link it, leave it blank.

I know most of you probably didn’t need to read this, so thanks! Those that should be reading this probably won’t. :(

Hwy 407 ETR — Loyalty Program

With the ever-rising prices of the Express Toll Route (ETR) Hwy 407, I have found myself using it less and less (it cost me $16.63, with a transponder, from end to end (102.7KM) last month) — which I think is the motive behind the new 407 loyalty program.

680News – Debra Edwards, with reports from Canadian Press;

Toronto – It will soon cost regular users less to drive on Highway 407, as its operators plan to unveil a new loyalty program this week.

Lovin’ my Garmin

I do alot of driving for my job and have always used MicroSoft Streets & Trips as a route planner. For large job routes, I’d even fire up the laptop, put it on the passengers seat and throw the GPS module in the windshield — but what a PITA!

So, this Christmas I decided that enough was enough — I needed a portable system — and started doing a little research on the models available in my area. I looked at all kinds, but mostly systems that were “inexpensive” or on sale. Of course, this had me looking mostly at “offshore” or “no name” brands, which proved to be a big waste of time. The old saying “you get what you pay for” started to set in.