Hyperterminal ‘send text file’ eats ASCII LF / 0x0A

2010-07-31

Hyperterminal “send text file” eats ASCII LF / 0x0A …

I stumbled across this problem because I was reading a protocol document for a device connected by RS-232. The document described what bytes to put in a text file, and how to use Hyperterminal’s “send text file” to send them. That all worked great. But as soon as I tried to get it working in C#, nothing nada zip. Unfortunately, “Line Feed” (ASCII LF, 0x0A) was one of those bytes.

This problem is mostly suffered by people trying to use Hyperterminal to send files to, eg: a microcontroller. But it looks like I’m not the only one to have stumbled upon this one:
“11 0d 0a 44 4d”

The document specifies it, hyperterminal eats it, and when my code actually sent it the device just ignores the whole message … Leave it out and bingo! The message, no longer corrupt, produces a response. What’s really odd is this: the device, when it replies, uses CRLF as its line separator. This raises the horrible suspicion that the alleged developers of this protocol wanted to send CRLF, found themselves stumped by Hyperterminal, and just gave in and changed the implementation instead of changing the protocol or using an non-broken client …

(if only it was a blood-pressure meter, that’d come in handy about now …)


FreeTDS without udp 1434

2010-07-02

Just a quick note for anyone trying to do FreeTDS through a tunnel or a firewall pinhole or whatever: If you specify an Instance name, FreeTDS goes and probes UDP 1434 to determine the port number for that instance, even if you also explicitly specify the TCP port number you want it to use. The problem being that often that UDP connection won’t get through, and FreeTDS will just time out with a “Read from SQL server failed”.

[whatever]
host = whatever.example.com
port = 1433
instance = foo

This isn’t really documented anywhere, and seems very counterintuitive, but if you look in the FreeTDS source, there it is in src/tds/login.c:

if (!IS_TDS50(tds) && !tds_dstr_isempty(&connection->instance_name))
connection->port = tds7_get_instance_port(tds_dstr_cstr(&connection->ip_addr), tds_dstr_cstr(&connection->instance_name));

So now you know. If you don’t specify the instance name, it notices that you’ve specified the port and just goes there directly. Filed it as a bug on FreeTDS, just for fun.


The Lost Socks

2010-04-13

Did you ever wonder what happened to those socks which went into the tumble dryer and never came back? Perhaps they just turned bad … started hanging around in parks, selling smack to possums …


Drug raids uncover heroin-filled sock up tree


iPhone / iTunes / Windows XP / VirtualBox / Ubuntu 9.10

2010-02-24

Finally got this to work properly. The biggest trap is that when it restores / upgrades / whatever, it changes its USB ID, so don’t filter just on what it is when its working, or it will get stuck in recovery mode. DAMHIK.:
Read the rest of this entry »


a small orange what?

2010-02-04

Moving all the *.zoic.org stuff off onto asmallorange. So far, completely blown away by the speed of customer service and the range of features available. Should be a significant improvement over hosting it at the end of my home ADSL!


ePaper vs. iPad

2010-01-29

Sick of hearing about iPad yet? I am :-) Nonetheless …

Whether it is or isn’t a glorified iPod Touch, what’s most interesting about the device, for me, is that it _isn’t_ an ePaper device (like the kindle, &c). It’s battery life is pretty good anyway, but I guess the idea is you’d use it much like your phone … use it on batteries, but recharge early, recharge often.

It’s a pity though, because if anyone could carry off a stylish, minimalist user interface specifically designed for touchscreen ePaper, it’s Apple. Love them or loathe them, they do do design well.

Always on. No buttons. Just the bezel. Gestures at the edge of the display. Hand-drawn icons in charcoal. That kind of thing.

hmmm.

PS: just bought an iPhone, I wonder how it’ll go as a book reader?


Merry Whatever, and a Happy New Thing

2009-12-24

Whatever it is you’re celebrating at this time of year, happy *that* :-)


Thought for the Evening

2009-10-29

Any sufficiently flexible methodology is indistinguishable from doing it however you feel like.


wget –certificate=$X –private-key=$X

2009-07-23

wget 1.10.2 seems to silently fail to use an SSL client certificate unless you specify both –certificate and –private-key:

wget --certificate=$PEMFILE --private-key=$PEMFILE
 Read the rest of this entry »

First Post !!!1!

2009-05-14
wally

To prove him wrong, here is a picture of my cat.

So, yeah, I now have a blog, because Steve Yegge says I should. He may not, I admit, have been thinking of me personally when he wrote that.

Read the rest of this entry »