Sunday, September 7, 2008

installing EPSON TM printer in Windows XP using USB to parallel port troubleshooting

It took me almost 3 days to solve this problem.
For background story, I have a EPSON TM-T88IV, and I want to install it to my new EEE Box. My EEE Box doesn't have any LPT port, so I bought a USB to parallel port cable.
I thought it would be as easy as plug and play. Unfortunately, it's not.

I won't tell long story about my struggle finding the solution.
So here's the solution:
- don't connect the printer (I don't know if this step is necessary)
- use WinXP driver (APD304E.exe)
- Install it
- After select module dialog appear, pick TM-T88IV Driver and select Port configuration. Select USB.
- continue install, and restart the computer.
- After restarted, connect the printer. Window will detect TM-P2.01, and want to install driver.
- Just press cancel.
- Open Control Panel -> Printers and Faxes
- Right click on the printer (T88IV) icon, and select properties.
- Select "Ports" tab.
- find the "virtual printer port for USB" in description.
- select it, and click apply.
- Test if the printer really connected to this virtual port. Unplugged the USB-LPT cable, and see printer icon in "Printers and Faxes" window. If it's connected, it should become "offline". and then plug it again, the status will be "ready". If it's not, well you can stop here, because I don't experienced this. If you have more than 1 virtual printer port, you can try it one by one.
- Uncheck "Enable bidirectional support" and "Enable printer pooling".
- Apply again.
- In "General" tab, you can test print. Click on "Print Test Page".
- And there you have it.

Thursday, June 19, 2008

Code 128 font (barcode) code in C#

I have problem using code128 barcode font.
When I use character 154 (& #154) in html it will be š but in C# its wrong.
š value will be 353 in C#.
So I make table for the character.
here's the codes:

readonly static string code128AsciiTable = "€!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~‘’“”•–—˜™š›œ";
private char Code128ToAscii(char c)
char res = (char)code128AsciiTable[(int)c];
return res;
private char AsciiToCode128(char c)
char res = (char)code128AsciiTable.IndexOf(c);
return res;
private char Code128CheckSum( string str, char startChar )
int result = 0;
for (int i = 0; i < str.Length; ++i)
result += (int)str[i] * (i + 1);
result += (int)startChar;
result %= 103;
result = Code128ToAscii((char)result);
return (char)result;
public string ConvertToCode128Format(string str)
char startChar = code128AsciiTable[104];
char stopChar = code128AsciiTable[106];
string convertedStr = "";
for (int i = 0; i < str.Length; ++i)
convertedStr += AsciiToCode128(str[i]);
char checkSum = Code128CheckSum(convertedStr, (char)104);
string FullConvert = startChar + str + checkSum + stopChar;
return FullConvert;
public void Test()
string testString = "156461003";
string code128String = ConvertToCode128Format(testString);

Friday, June 13, 2008

Agile Planning in my office

For the past 7 months, I've been introduced and experiencing a whole new world of software development planning, that's called Agile Planning. Well, I know it's not a new thing, but it is for me. I heard a lot about this method since 2 years ago, but I haven't got a chance to experienced it until 7 months ago.
When I first heard about it, I thought it was just another gimmick in software development, that will be forgotten in 2-3 years. But I was wrong, and I'm glad I'm wrong, because --for me-- this method is the best system in software development planning.
It so simple, but yet it so spot on in solving the problems in old ways of planning (waterfall). Starting from the scrum meeting, sprint, and milestone. It just feel so right for me.
I recommend everybody working in software business, at least have a try implementing agile development. Read Mike Kohn's books, or at least check his website.