April 1, 2010
March 21, 2010
A Taiwan Food Diary
I recently had the good fortune of visiting Taiwan on business. Food being one of my hobbies I visually documented each meal (and some snacks) so that I could later create a food diary of my visit. Click on each picture for a description.
March 9, 2010
Taiwan Trip 2010
Getting ready to go to Taiwan again. This time for a week. Looking forward to the free time but I’ll miss my family for sure. Today Chloe (3 yrs old) kept asking if she could come with me. I told her I wish she could but that she would need a ticket. “Do you have a ticket daddy”?. Yes but I only have one. The airplane people won’t let you on unless you have one too. 20 or so minutes pass and she came to me with 2 pennies. “Now can I buy a ticket daddy”? Oh I’m sorry sweetie you need more money to buy a ticket. You need about three hundred thousand pennies to buy a ticket sweetie. “Do you have ree hunded thousand pennies daddy”? No sweetie I don’t. “Mommy? Do you have ree hunded thousand pennies”?
It’s going to be tough to leave
February 18, 2010
Cherub – Latest Progress
Boy oh boy is it a lot of work creating a game. To that end I am actively recruiting if anyone is interested in helping. Here are the things I am needing help on.
- Art
- Requirements
- Development
If anyone is interested please get in touch with me via comments on this post and I’ll provide more information.
On With the Show
Ok, now for the meat of the article. I wanted to take time to clear my head and remark on the things I have completed in the last few weeks. I am sort-of at a stopping point and to better enable me to take stock of where I am and see where I’m going I am putting my progress down in print. I’ve decided to put this together in reverse chronological order for no particular reason.
Statistics, Attributes and Formulas
The last few weeks I have been focusing closely on the core components of the game’s strategy engine. Those components are primarily statistics, attributes and formulas.
I spent a very long time trying to come up with some answers to the most basic of questions in this area. What attributes do I want to use? I enumerated a few dozen or so on my site to start with, but did I really want to use them all? What do I want the different attributes to mean? What would be considered a high or low value for each attribute? Is 17 high, or low? Which attributes will go into which formulas and how do I want the formulas to work? Do I want to optimize for performance or control? A lot of these questions had dependencies on each other making them very difficult to answer.
Here is an example of the progression of the Cure 1 formula since early November 2009:
- 200 * (Intelligence / 10) + (Random Number between 1 and 55) – (Nov 4 2009)
- ((200 * max(1, (Intelligence / 5))) / 10) + (level + max(55, (random(1~55) + luck))) – (Nov 5 2009)
- ((200 * Math.Max(1, ([in] / 5))) / 10) + (Level + Math.Min(20, (rand(1,20)+ [lu]))) – (Jan 27 2009)
- [wi]+[mp] + rand(0,Level*10) – (Feb 17 2009)
- [ms]+[mp] + rand(0,15) – (Feb 18 2009)
As you can see over time it’s become much simpler. I do expect it will change a little still but it is definitely close to where I want it to be.
Coming to this conclusion has been necessary to be able to start the portion of the code that actually processes the round requests from the players as knowing this type of information ahead of time affects the design of the formula calculation engine.
I also had my brother help with an app that will accept a formula (like those typed above) and, given a formulaic or static rate of increase for the attributes in question, will show you how the formula performs progressively over different levels. I’ll ultimately port this app to web so that it can be accessed from the wiki, but for now I have included the graphed output of the app in the spell pages for which I have formulas ready. One is right here.
Figuring the Cure 1 formula out to this depth required I decide which attributes I was going to use and what they were going to do. I now have the attributes I plan on using in the game highlighted with an orange background on the attributes page. Additionally I have put a screen print of a visio on that page showing how the attributes should be used throughout the game as well as some ideas for dealing with cheaters (or stats boosting).
Contributor Kit
I don’t want to go into details on the plans behind the contributor kit, but it is basically an app or suite of apps that will give members of the community the ability to contribute to the game with artwork or other things.
I spent a few weeks on this kit and am just about 1/2 way through a product that will allow someone to generate XML output based on a spritesheet that Cherub can use for stills and animations. It is also something I will probably use during development although I don’t yet have any artwork for my game…. yes I’m working on it!
until next time!
January 14, 2010
Cherub Milestone: Create Team Feature Complete
Welcome
Welcome to the latest installment in my game development subset of entries. I’m officially commissioning you to help with input on the latest testable piece of my new game, yes you! Before you get all excited, there is pretty much nothing glamorous about this. I really have no artwork and the usability and visual design are in their first draft. In the interest of keeping this as concise as possible, I’ll get right to it.
Create Team
The latest testable piece for which I am soliciting feedback is the “Create Team” piece. This also happens to be the first really testable piece (other than the menu) as all other development up to this point has primarily been foundational.
I started with the Create Team screen as the first feature since the team is really at the heart of the game. Each player can create a single team (I upped the limit to 3 for this test). Each team consists of exactly 4 team members. Each team member has a class (only 4 are available in this demo), a look (I only have stand in art here now and only 3 models to choose from. Yes that means you’ll have to give more than one player the same look) and a name. And finally each team also has a name.
To get to the Create Team screen, first visit this url: http://apps.facebook.com/battleschool. Using the application requires a Facebook account and requires Microsoft Silverlight 3.0 which is free and a small install. This part is intended to be pretty seamless so I would appreciate it if you can report any issues you have on this step. Once the Silverlight application loads you should get a screen with 3 options: Play Game, Statistics and Exit Game. Click “Play Game”, on the subsequent menu click “Create Team”.
I’m intentionally not going to go into details on how to use the Create Team screen as this is intended to be a usability test as much as anything. I realize it is pretty rough around the edges right now and hope that with everyone’s help I can make it look better and make it easier to use.
Some specific feedback items I’m looking for:
- Did it take a long time for the application to load initially?
- How easy was it to use the Create Team screen?
- Any suggestions for different design or look of the Create Team screen?
- Was the application sluggish at all?
- Did you get any error messages or find any bugs?
Feel free to leave any feedback in a comment here.
January 2, 2010
A History of Bad Experiences with Qwest
The title of this article implies I will be giving multiple examples of my bad experiences with Qwest. While it’s true that I have had two phenomenally bad experiences with Qwest, I will only be going into detail on my most recent experience with them. I chose this title instead of something like “Qwest Has Really Bad Customer Service” because I also don’t want to infer that noone can have a good experience with Qwest.
A little bit of history
In 2001 I had a terrible customer service experience with Qwest over DSL which I will not be going into. It’s worth mentioning up front however because it was an experience sufficiently bad as to cause me to never want to do business with their company again. Qwest is really the only company I have ever felt so strongly about an experience I have had with them as to never want to be a customer of theirs again.
Fast forward to February 2009…
While making a visit to my parent’s house my mom remembered a piece of mail she received recently with my name on it and went to retrieve it. When she returned she presented an envelope addressed to me but at my parent’s address. I further noticed that the sender was “Qwest”. Remembering my bad experience with Qwest in 2001 I announced that I really was not interested in anything they were trying to sell me and, wondering out loud why they would send me mail to my parent’s address, set it aside without opening it.
A few weeks later my mom informed me that another piece of mail had arrived at their home for me from Qwest and that, being overcome with worry, she opened it. “It’s a bill”, she told me. Thoroughly confused I looked at the bill. The account number “8019690680″ appeared prominently displayed on the bill. Undoubtedly a phone number I figured although, racking my brain, I could not recall ever having a phone with that number. I thought all the way back to when I was still willing to use Qwest as a service provider and tried to recall having any phone number, other than my current, set up in my name. I tried hard to remember but could not recall the phone number I had for a cell phone I bought for a 1-year stint in 2000 but was pretty sure Qwest didn’t offer cell service back then and… oh yeah, that was a voicestream account. Stumped, I decided I would give them a call to find out what was going on.
Within a few days I was on the phone calling to figure out how they had unintentionally sent a bill for a different David Brinton to my parent’s address. I thought that perhaps they had a second David Brinton as a customer and had lost track of that David’s address information. Then, scouring their old records, they found my account from 2001 when I still lived with my parents? The woman on the other end of the phone didn’t know where the account had come from either. She told me it was set up December 8th but that if it was a mistake she would “take care of everything”. She also tried to convince me that “Qwest was different now” and that I “should try us again”. She was incredibly accommodating and I felt a lot better about the situation when the phone call was over. (I wonder if she is paid on commission?)
It wasn’t many weeks later that I received another bill. I ignored this one because after all I was told it had been “all taken care of”. I reassured my mom that the problem was resolved and that she didn’t need to worry about any more bills; That, internal bureaucracy and the delay in the mail system was the reason they hadn’t stopped yet. A few weeks later another bill came so I called Qwest again. This time the individual I spoke to indicated that nothing had been done about my request a few months earlier and that this time I had nothing further to concern myself with and that now it would all be taken care of. My mom also called on my behalf during this time and she was told something similar. In spite of being a little wary from the broken promise of my last interaction with Qwest, I still felt confident enough to trust their word on this one. After all both individuals I talked to were supremely confident that the situation would be easily resolved. Certainly the first time was just a fluke.
Well some more time went by where we played the same game as before, waiting for the bills to stop coming. And of course they never did, but honestly I was content to let it all continue like this until resolution. I did not expect what Qwest would do next.
Summer of 09 the interest rates dropped to a phenomenal low. My loan agent contacted me via email telling me if I acted right away I could get a 4.7% loan. Our loan at the time was \
somewhere in the sixes and calculations showed the drop in interest rate would save us more than $200 / month and something like $170,000 over the loan life. We told him to pull the trigger on that rate and he went to work on a loan for us. A few hours later he contacted me with bad news. My usually great credit was not so great right now. When I asked what was affecting it he told me it was a bill that had been sent to a collection agency by Qwest.
For me this is where it all turned ugly. They definitely crossed the line here. My credit was being affected by some entity I have spent the last 7 years avoiding doing business with? What gives them the right or power to affect my life like this in such an impactful way? I’m not even a willing customer! At this point it really felt to me as though my rights had been violated in some way. I called to talk to Qwest again, this time they weren’t quite so optimistic about my problem being resolved, or quite so pleasant to talk to. They informed me over the phone that the fraud department of Qwest had investigated the situation, but that they had determined independently that there was no fraud committed and that the balance stands. When I asked to talk to the fraud department I was told that was impossible. The only thing the person on the phone could tell me was what the fraud department’s findings were. They could do nothing else for me. Insisting I talk to a supervisor I got the same story from them. Also, since the collection on the account had been turned over to a collection agency I had to talk to them to get it resolved.
The collection agency
The first collection agency I called had turned the account over to a second, smaller collection agency that sounded like it had exactly 3 people working there. The people were nice enough to work with but they were really frustrating because noone really knew how to do anything except collect money. Whereas I had questions like “how do I get this blemish off my credit”. Finally, feeling as though I had no other short-term choice, and with the inference from the side of the collection agency that once paid the item would be removed from my credit, I paid the bill in its entirety. A bill for an account I never opened. A bill for an account I never used, and never knew existed. An account that was opened by Qwest on my behalf without my knowledge or permission.
Finally, I thought, I would be able to move forward with my loan. I called the loan officer and found out what else needed to be done. He told me I needed a letter from the collection agency indicating the offending information would be removed from my credit. Over the next few weeks we tried getting letters, faxes anything from the collection agency. They had no idea what I needed and when they would attempt to fax information saying it was paid in full it never made it to its destination. Sparing you all a lot of boring details, it turns out the collection agency will only remove the item from my credit immediately if the account was successfully disputed. Well, I didn’t dispute it because I was led to believe that going this route would resolve the situation more quickly. I guess it turns out, it only resolves the situation for Qwest.
Back to the Qwest side of things
Meanwhile, of course, since I never opened the account in the first place, I was still pursuing an ongoing dispute with Qwest. Since I couldn’t talk to anyone in their fraud department and the people I could talk to were of no help, I was told my only outlet was to mail, yes mail a written dispute to their corporate office. I chocked this up to them wanting to throw as many barriers in my way to prevent a dispute from going through. This seemed to me like a very crooked way of doing business. While it seems they were within their rights to require a dispute be submitted in this way, they clearly were not trying to make things easy on me. If it were someone less principled, or if the account was only for $50 or so Qwest would get away with this type of theft. If this is a common problem with Qwest (and folks I have talked to at the Public Service Commission have implied that it is) they could acquire hundreds of thousands of unearned dollars each year. Which is just another way to say they could psuedo-legally steal hundreds of thousands of dollars each year.
The written dispute went unanswered. I can assume it triggered another fraud investigation but noone at Qwest contacted me to tell me they had received the letter, nor did anyone contact me to tell me of any investigation results. Finally feeling at the end of my rope I started to consider legal action. It felt awkward even considering the idea because I don’t like what the legal system has become to many Americans. It seems every other month you hear about someone suing because they burned themselves on some coffee, but I didn’t feel I had any other recourse. Of course the bill in question is for $180 or so which is small change but being out $180 wasn’t what had really affected me so much. I was much more affected by the $200/month I won’t ever see now or the $4000 it would take to buy my rate down if I closed now. I don’t like the idea of getting something for nothing or the expectation a lot of people have now of entitlement but to me Qwest had taken something away that they had no right to take away and were not only willing to try to resolve the problem but were intentionally being difficult about it.
Legal action?
I decided to call prepaid legal as it seemed like the least expensive outlet for finding out if I had any recourse for the way I had been wronged by Qwest. Of course taking legal action is somewhat of a gamble. It can cost you a lot of money if you don’t win and so before doing anything in the courts the attorney I talked to recommended I call the Public Service Commission. I called them right after I got off the phone with the attorney.
Public service commisison
This is the stage in the process that I am at currently. Getting help from the Public Service Commission has been extremely simple. I called them and within 5 minutes I had a dispute against Qwest set up. They informed me that Qwest would be contacting me within 5 days to let me know the outcome of their new investigation.
Qwest’s executive offices
Well calling the Public Service Commission certainly got Qwest’s attention. When I first got the call from Qwest and the woman on the other side purported to be from the executive offices I must have gone on for a full minute about how grateful I was that I was finally able to talk to someone from Qwest that had the authority to talk to me about the problem. The conversation I had with this woman, however, leads me to believe calling the Public Service Commission to try to get a resolution had only annoyed them and they were only calling me back as some legal requirement.
She agreed to hear my side but interrupted frequently to tell me that the conversation was over and she wasn’t going to close the account and repay my money. I don’t think I finished getting even 1/2 of my story out. About 5 minutes into the call she was trying to end it. Clearly, I thought, she was trying to get out of the office to go to lunch with some friends or something.
In a nutshell here are her reasons for not resolving the issue in my favor:
- If this was really an account you didn’t want why did it take you so long to call to resolve it? … Ummmm, I didn’t know about it? You sent the mail to an address where I don’t live?
- That the relationship she has with her son would never have allowed a month to go by before she gave him the mail. … Ok?
- That because they have my social security number that logically it follows I opened the account. … What!?
- That the service was used. … Not technically possible, my parent’s have never owned a two-line phone.
This is basically where I am at in this process. My next step is to call back the Public Service Commission on Monday to hear the official report they received from Qwest. I’m writing this so that noone I know will become a Qwest customer without knowing this about them and that hopefully it will dissuade at least one person from doing business with them.
I have left out a few details because I’m not much of a writer and I don’t really enjoy it
.
February 4, 2009
C#: Doing a modulus (mod) operation on a very large number (> Int64.MaxValue)
[code lang="c#"]
///
/// calculates a modulus on any number, specifically
/// designed to work around the Int64 limits of the
/// current version of c# which cannot hold a number
/// larger than 9,223,372,036,854,775,807
///
///
///
private static int largeNumberModulus(string numberToModulus, int modulusOperand)
{
string modulusWorkingNumber = numberToModulus;
while (modulusWorkingNumber.Length > 0 && !(modulusWorkingNumber.Length < 18 && Int64.Parse(modulusWorkingNumber) < modulusOperand))
{
// number to work with
Int64 currentNumber = 0;
if (modulusWorkingNumber.Length > 18)
{
currentNumber = Int64.Parse(modulusWorkingNumber.Substring(0, 18));
// remove first 18 characters
modulusWorkingNumber = modulusWorkingNumber.Substring(18);
}
else
{
currentNumber = Int64.Parse(modulusWorkingNumber);
// remove remaining used characters
modulusWorkingNumber = string.Empty;
}
string carryOver = (currentNumber % modulusOperand).ToString();
modulusWorkingNumber = carryOver + modulusWorkingNumber;
}
return int.Parse(modulusWorkingNumber);
}
[/code]
January 24, 2009
TheForm is undefined / not defined error in asp.net
`I just spent about 3 hours trying to fix this error with the LoginStatus control. The control updates fine when I log in, but when I click the “Logout” link on the LoginStatus control I wasn’t getting a postback. After a little more looking I noticed I was getting a javascript error whenever I clicked Logout. The error I was getting was “TheForm is undefined”. I googled and googled and googled and ultimately I didn’t find the fix for my problem on google but I did find a lot of different solutions to the problem. I am consolidating them with the solution for me all in one place so that hopefully noone else has to go through this.
Scenario 1
Make sure when including external Javascript files like so:
[code lang='html']
[/code]
Scenario 2
The script created by Asp.Net references your form by id. Make sure your form id matches what is shown in the javascript generated. For instance mine had to be named Aspnetform so I made sure it looked like:
[code lang='html']
[/code]
This will not work. Swap the order of your tags to be thusly:
[code lang='html']
[/code]
Hope this helps someone else.
September 15, 2008
Speed Up Your Computer
This is a beginners guide to speeding up your computer. This is step one of the guide. For step one we will focus on hard drives. The slowest components in your computer are those with moving parts. This is why it is best to start here. The more RAM, faster CPU craze is something that even consumes some of the experts. The fact is though, that more RAM, faster CPU might not actually be what you need. Indeed spending money on these components might not do anything to speed up your computer at all!
This is the first in a series of articles designed to make it easy for you to know how to speed up your computer (pc or laptop) with the least amount of money or work.
How to know if you need a faster hard drive
Laptop Users:
Most laptops come with slow hard drives to help increase battery life. Although this is the case, putting in a faster hard drive is not likely to cause any battery life problems.
Step 1: What am I working with now?
Most laptops come with 5400 RPM hard drives and most PCs come with 7200 RPM drives. If this is the case for your computer and you are looking to speed up your computer and extend its life, you need to upgrade that to a faster drive. First, though, let’s check your current drive speed. Click: Start, All Programs, Accessories, System Tools, System Information. This should give you a screen that looks like the following:
Using the above image as your guide, expand Components, Storage then select Disks. On the right-hand pane you will see a description of your disk drive. Write down the Model (In my case HTS721080G9AT00) and do a search for it on Google. This should bring up results that will give you specification information for your drive and tell you what speed it is. To find the speed look for the numbers 5400 or 7200 and the letters RPM. Drive speed is measured in many ways, the RPM specification shows you how fast the disk spins. Here are the specifications on newegg for my drive:
I have highlighted the RPM specification to make it stand out a little more for you.
Once you know your speed you know if an upgrade can help speed up your computer. This is the case if you are using a laptop and you have a 5400 RPM drive (or less) or if you are on a desktop and have a 7200 RPM drive (or less). Here are some links to some good drives that I can recommend to help speed up your computer.
All of these links are from a company called Newegg. I have been a Newegg customer since October of 2003 when they were first getting started. I cannot recommend any online retailer more highly which is why all of my product recommendations link to them.
These links are for some great hard drives focused at performance for your PC or laptop (ordered by most highly recommended) – Updated 09/2008:
Laptop (price range before shipping: $99.99 – $164.99):
PC (price range before shipping : ($149.99 – $294.99)
June 23, 2008
Bulk / Batch Printing on a Network Attached Epson Dot Matrix Printer
I recently had the “opportunity” to learn first hand how to go attack the topic of batch printing against an Epson Dot Matrix Printer. I’m posting this here to document my woes and difficulties on this very bumpy road.
Defining the Problem
Why should batch printing be any different than single printing? There are a few simple reasons this is different:
- Running out of paper
- Paper jams
- Printer becomes paused
Basically the problem is, if you send 100 print jobs to the printer, you want some way of assuring the jobs actually completed. Imagine if you sent 100 print jobs to the printer and the printer runs out of paper at 50. If your application isn’t set up to do batch printing properly it will send the remaining 50 jobs to the printer even though the printer may have no way of receiving them. Whether it is capable of receiving these jobs is really a matter of the model and how much memory it has to queue up your jobs. The size of the print jobs is also a factor. So your application happily sends the remaining 50 jobs to the printer, how many ultimately print successfully when the paper is loaded? 20? If so what happens to the other 30 print jobs? How does the user even know that they didn’t print or which ones didn’t print?
Finding the Answer
Epson was exactly 0 help on this issue. There was no information online that even gives a hint of a clue of an inkling of where to even start looking. So, I emailed their support department. Here is the email I sent them:
I am writing an application that will print invoices to [a printer with model #LQ-2090]. One requirement of this application is for batch printing. I have a few questions about the support for batch printing with this printer:
1. If it runs out of paper while jobs are being sent to it, what is its behavior? Does it queue requests? What queue limitations (memory limit etc) does it have?
2. If #1 isn’t possible is there a programmatic way to query when the printer is out of paper or otherwise unable to print?
This email was sent originall on 06_05_2008. Since I was actively working on the application I couldn’t wait for their response. The chances it would take too long or that it wouldn’t be helpful were too great. So I did some researching of my own as well. Ultimately the answer came through my own research. I think Epson sent some response about how much memory was available on the printer and then said there was “no way” to ask the printer for a status. So just as I anticipated the response didn’t yield any information that would be helpful, in fact it was wrong about not being able to query the printer for a response. Their email also came several days after I wrapped up the project. I can’t find their response so I can’t say the date exactly but I want to say it took them something like 2 weeks to respond.
The Solution
Ultimately, as I said, I found the answer myself. I was coding along happily one day when one of my colleagues mentioned there was a web server built in to the network card we installed in the printer. Curious, I decided to check it out. It was from that web site that I got my first glimmer of hope. The printer supported SNMP and there were configuration items for setting up SNMP and SNMP traps Sweet! My first instinct was to do it all through traps. Surely the printer would send me a message saying “Please Load Paper” or something like that whenever there was an alert. So I pulled out my Trap Receiver application (iReasoning) and told the printer to send all traps to my desktop. With that all set up I simulated a few scenarios by forcing an out of paper situation, a paused situation and a jam situation. From across the room I could see my trap receiver filling up with traps. Excited I ran over to my computer to see what information the printer was sending me. My elation was premature and short lived. For a few minutes I compared the different traps I had received trying to notice differences. If I was sent the number 12398521 for instance whenever the printer was out of paper, I could just put those values in a config file and be done with it. What I found though over the course of a few minutes was that every trap was the same! What? It didn’t even matter if the trap was sent for a different reason, the data I recieved was exactly the same! Well, the same save for the fact that it was including in the trap an incrementing number. So the first trap sent 0, the second sent 1, the third 2 and so on. Well this is completely useless! If I want to know how many traps I have received I can count them myself!
. I have a little experience with SNMP traps but if this is a standard thing to do with traps this is a new one for me. Whenever I send a trap I include a human readable message letting someone (or some program) know what is going on. Ultimately I did figure out (I think) what these incrementing numbers were supposed to be telling me. More on that later though. Well, it was apparant that the SNMP traps weren’t going to be of any use. I could treat them like a toggle I guess, but how would I know to have the toggle on or off to begin with? How would I know if I got a message even if the printer was capable of continuing to print? This is not a solution I would except, so I decided to keep looking. The next place I began looking was google. I decided to do a search for something less specific, a search that didn’t include Epson or LQ2090. Doing that got me a hit that ultimately led to the answer. The hit I got was of someone asking how to use SNMP messages to get printer status information. While the article I found was for a different printer and didn’t have any information in it that was, in the end, directly usable getting the hint that SNMP messaging is a possible route I could go was invaluable.
From there it was more and more google searches that led me to this real gem (extreme sarcasm applied here): ftp://ftp.pwg.org/pub/pwg/pmp/mibs/rfc1759.txt. This my friends is rfc 1759. I recommend you look away, look away! Everytime I try to get any useful information from an RFC it always leaves me asking “WHY!?!”. Why on earth would someone write this, and how is it supposed to be useful? After a lot of searching I was finally able to find a guide that explains the RFC. This guide broke down the RFC terminology and explained what it meant, then gave the SNMP OID for each item. This guide, IMO should be the RFC. In any case, guide useful, RFC useLESS! *sigh* ok I feel better now.
As much as I have talked up the guide, it was also ultimately of no help
. Although it did contain what I was searching for, I couldn’t find what I was looking for as a consequence of just not expecting what I was looking for to be called what it was called.
So how did I find the answer? Good old trial and error / brute force. I opened up my MIB browser app (also by iReasoning) and told it to hit the printer with every SNMP message possible by doing a walk on OID 0. This yielded hundreds of results, with after a little doing I was able to copy into a text file and save it. I did this 3 times: once when the printer had paper and was good to go, once when the printer was in an out-of-paper error state, and once when the printer was paused. I then took those 3 files and did a diff on them using KDiff (a very nice diffing tool). What I found is below (you will want to click to enlarge):
The OID that is shown in this diff is the “printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertDescription.1″ OID. While this seems like a very reasonable thing to call it I was still unable to find it through my searches either in google or in the above-mentioned guide. I was always searching for things like “printer status” or “out of paper”. In any case, this brute force method did give me all I needed to begin querying the printer for its current state and so I was basically done with my discovery session. I don’t know all of the unique alert descriptions that can be retrieved from this printer on this OID (I couldn’t find a list anywhere from epson even after I knew some items on the list) but here are those I have found: supply the paper, remove the paper, paused. Of course it is not unlikely for this to be different between printer manufacturers and models so you may have to do a bit of trial and error.
One Final Small Problem
One minor final thing I ran into was that the OID would change slightly upon each new alert. The first alert would show up under OID printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertDescription.1.0, the second printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertDescription.1.1 and so on up the number scale until the printer was power cycled. This gave me another “A-HA!” moment when I suddenly realized what those stupid traps I mentioned before were all about. The aforementioned printer RFC had some information in it indicating the printer could have multiple rows of alerts in a table in its MIB and that there needs to be some method by which one can return things like total number of alerts and current alert index via SNMP. I never figured out how to send an SNMP message to the printer to retrieve the current alert index (although the RFC seems to indicate it is possible), but I now realized the incrementing number in the traps was the alert index. I could then use that number to construct the correct OID for my SNMP message querying the printer for its alert status description! Pretty cool!
Now, For those of you who aren’t receiving or cannot programmatically receive traps from your printer another solution to this problem (and the one I ended up implementing) is to attempt to get the alert description at OID .0. If that fails (or returns an empty value), tell your SNMP client to do a GetNext(). If the GetNext returns a non-empty value that belongs to an OID that begins with “printmib.prtAlert.prtAlertTable.prtAlertEntry.prtAlertDescription.1″, then you are good to go. Here is some sample code that does that for your reference:
[code lang='csharp']
while (manager.LastError == 0 && returnedValue.OID.StartsWith(oid))
{
value = returnedValue.Value;
returnedValue = SnmpObject.manager.GetNext();
}[/code]
When this loop completes “value” will have the “next”-most value for the OID we are targeting.
All Done
This marks the end of the material I set out to cover. Hopefully this will be useful to anyone trying to get a batch printing application off the ground. SNMP is universal so as long as your printer is network attached, even with vastly different features, the solution could likely be similar.
Comments and questions welcome, thanks!



