Mac OSX to Finisar (shorter)

Uncategorized No Comments »

In Mac OSX to Finisar I wrote about a more modern-ish way to connect to a Finisar ProbeFCX or Xgig Chassis. By definition, this similar config should work on GCX4000s and Apcons, if you (dear reader) recognize where those are used.

I just made it easier.

Since I live out of a suitcase, this makes my life easier.

I’m using the same process as before (using the evil “screen” tool), the GUC232A, plus a few extra bits, totalling:

Notice how these things are easy to get to? I think a WinTel works in place of the Mac, but mine don’t stay running for long enough.

Anyone from JDSU may say “well, gee, this is fairly basic”, but rather than follow the rules like a mantra, I wanted to do this with easier-to-pack parts that can be replaced or cross-shipped if needed.

This is what works:GUC232A-NullModem-GenderChanger

The trick is that the GUC232A is only 45cm/18inches long, but I can put a standard USB extension on it, route it through a US-4A or bang it on an unused server port anywhere.

Read a Barcode

Uncategorized No Comments »

Jonathan Washington determined how to Read a Barcode without a reader, and using his description it’s fairly easy.

The numbers have a bit of a delicious pattern; let me expand a bit from the Wired How-to Article, which presented this example:
Barcode_example1

The Digits themselves break down as follows:

digit code
* 0-0110
0 00-110
1 10-001
2 01-001
3 11-000
4 00-101
5 10-100
6 01-100
7 00-011
8 10-010
9 01-010

Simple, right? The barcode will also start and end in a 0-0110 sequence, which breaks the xx-xxx pattern. I cannot see Mr Washington’s article, the hosting has trashed it, so maybe this stuff is already discussed. The Wired Article is really hard to take apart from there — examples would have been nice — so I’ve expanded a bit on it.

Although we could look at the barcode digits as simple replacement cyphers — similar to the glyphs on the TV show “Fringe” — there is a key to the barcoding numbers themselves that would let a reader build a barcode cheat-sheet or lookup just before decoding a barcode to reduce the chances of error. Let’s remap the table above, add sample barcodes, move the zero after the 9, and add an asterisk markup so that we have an example of that as well:

digit code barcode
1 10-001 10-001
2 01-001 01-001
3 11-000 11-000
4 00-101 00-101
5 10-100 10-100
6 01-100 01-100
7 00-011 00-011
8 10-010 10-010
9 01-010 01-010
0 00-110 00-110
* 0-0110 0-0110

You can see how the progression of the 4 leftmost digits of each 5-bit sequence is actually a binary increment. The rule for that sequence seems to be “no more than two ones per digit”, and the 5th digit toggles one/zero to ensure that each sequence has two. Zero is pushed up to the “ten” spot, so it doesn’t have to suffer the indignity of no ones at all — for which the check bit would have to be 2. And what about 7? skipped. above, 7 is actually 8, 8 is actually 9, etc.

Asterisk is basically “zero” but with the spacer moved, perhaps to help key the scanner to the size and use the data itself as start/stop bits, the same way the 6-of-8 is done on an old floppy disk (leading bits are zero, after a spin there’s enough 0-0-1 and 0-0-0-etc to key the reader).

So now we have the magical logic to generate the bit patterns for the barcode digits, let’s markup the barcode and overlay some digits:

Barcode_example1-markedup

Now that looks a lot easier to digest.

Comments?

Not Seeing is Disbelieving

Uncategorized No Comments »

Speaking with a software architect — a young guy, obviously — he pointed out that he’s never seen the issues I’ve noted with a design he has, and so they must not exist. He went on to reiterate that he designed a product once that had an international market.

He didn’t ask what I had done, I didn’t volunteer it. I don’t need to swing a pedigree around, usually the recommendation I make are fairly obvious, sometimes only in hindsight.

It seems he and others seem to believe that if they haven’t heard of a particular issue, it cannot occur. This ignores:

  • Problems that occur that are not voiced because “it’s no use, they’ll never fix it”
  • Problems raised that are not escalated to the entity that can make a difference
  • Problems that are raised high enough, but are deemed “not a real problem because I haven’t seen it”
  • Problems difficult to replicate in a different country (similar to the comma problem I had in shell-based math, fails only in France)

People who discuss design and are aware of staffing/labour management don’t often bring things up for no reason. Of course, there is always room for a “painting the bike shed” discussion, but no one intends to waste staff hours. Typically, resolving things at design-time avoid staff-hours down the road.

Young architects don’t fully understand this, until they’ve done a few projects, and realize that they cannot personally see every problem.

It’s the equivalent of when software developers realize they cannot personally fix every known problem.

“Seeing is Believing”, eventually we get past the “Not Seeing is disbelieving” stage.

I remember this same argument, but by proxy: “I know a really smart guy, and he didn’t fix that problem, so that problem can never occur obviously”. I’m sure the logic errors there are obvious.

In this case, I elected to make my changes, and discuss them in hindsight. Some people recognize that I have the chinese habit of smiling and stopping when I see that I’m in an impossible task such as describing a round world to early Europeans. I don’t want to avoid making these changes, because that results in a waste of staff-hours that I don’t want to cause just to prove my point.

SNMP: What is it over there?

howto No Comments »

In a discussion about discovering SNMP devices, I started to wonder why we (my company) is still screen-scraping a telnet prompt to discover what sort of hardware is “over there”.

It’s actually much easier if you’re already configuring an SNMP client:

snmpget -Ov -On -v 1 -c public 192.168.0.1 1.3.6.1.2.1.1.2.0

The responses I’ve seen so far:
.1.3.6.1.4.1.1588.* Brocade Communications (hint: privatenumber 1588 is Brocade)
(ie .1.3.6.1.4.1.1588.2.1.1.1 )
.1.3.6.1.4.1.8072.* OpenSource stack (hint: privatenumber 8072 is net-snmp)
(ie .1.3.6.1.4.1.8072.3.2.255 is reported by Apple TimeCapsule)
(ie .1.3.6.1.4.1.8072.3.2.10 is reported by Synology ds209)

The reason for this path is to see whether we can use 1.3.6.1.4.1.9.5.1.3.1.1.17 to determine product IDs (port blades) on all manufacturers, or just Cisco. Brocade doesn’t populate .1.3.6.1.4.1.9 because “9” is cisco’s privatenumber 🙁

Mac OSX to Finisar

Uncategorized 1 Comment »

Finisar makes some great products — their SFPs are rebadged and used in many devices, and we use their ProbeFCXs extensively.

I’m not much a fan of waiting for my Wintel box to boot up or wake up, and it needs so many additional things to work: an extra trackball because the touchpad sucks, needs a wart on the bottom for a serial connector, needs much bigger power connector with extra internationalization tools to connect to foreign power sockets, etc. I fear when I’m on a client’s site, and the serial port in the wart doesn’t work… like a week and a half ago: I had to borrow a laptop to connect to the devices, which wasn’t very professional. I decided I’d find an alternative, and my Mac just always works.

I wanted a way to connect to one using my Mac OSX-10.6.1. The following works:

  1. install osx-pl2303 with this link: http://sourceforge.net/projects/osx-pl2303/files/osx-pl2303/0.3.1/osx-pl2303-0.3.1-10.4-universal.dmg/download
  2. OK, I rebooted rather than load the driver from the command-line.
  3. You can plug in your device and check for the driver using kextstat — mine shows nl.bjaelectronics.driver.PL2303 (1.0.0d1)
  4. connect using the cable that works on your Wintel to the PL2303 device (mine’s a GUC232A made in China)
  5. Mac OSX comes with the screen tool, so I used screen /dev/cu.PL2303-00002006 57600
  6. works fine

This process might work just as well on a Wintel, and is a smaller device to carry.
PL2303

Nagios Can Survive AutoHeader

patch No Comments »

What does it mean to survive autoheader? Portability, easier maintainability.

BTW: The patch is right here: nagios-autoheader.patch

Autoheader is a tool that creates the header file associated with autoconf-generated configure; autotools (ie autoreconf) tend to assume that if you’re using AC_CONFIG_HEADERS(), you have a header file generated from your configure.in or configure.ac.

FWIW, Nagios’ use of AC_CONFIG_HEADER(file1 file2 file3) is actually converted to AC_CONFIG_HEADERS(file1), but not using the plural makes it confuse autoheader a bit.

Consider that maintaining twenty files is more difficult than maintaining one; maintaining two files is only slightly more difficult, but still is an entry-point for human error.

Just like driving on the left (former British colonies, for example) is more difficult after driving on the right (everywhere else); for the same reason, doing things in a way that differs from the mainstream is more difficult for others — who are used to the mainstream — to adapt to. The corollary to this: approaching the mainstream way allows more developers to maintain your work.

The other benefit of joining the mainstream is that you gain from how the mainstream has “moved on”, and developed added benefits and utilities. For example, automake reduces the maintenance of makefiles, and gives you “make dist”. Nagios has a bunch of unusual scripts ot maintain versions of things, but Autotools do that by defining in the configure.in and substituting at ./configure time. This ties into the “maintaining fewer files” above as well as doing things in the conventional manner.

Note that it makes no difference whether a project has done it a certain way since USL times — a new user sees it for the first time only when they first see it, with no regard for how long it’s been like that. This is to say that if it looks broken when the user first starts to work with it, it doesn’t matter how long it’s been broken, or if that method wasn’t considered “broken” when filing a stack of cards for batch-processing.

The small change I’ve done today allows Nagios to approach the current conventional method, and opens the path for further enhancements in a step-by-step progression of little changes at a time.

Sneak in an Update, Won't You Microsoft?

Uncategorized No Comments »

The way I use a computer, it’s very much a “show me what I want, don’t show me what I don’t want”. It’s all about choice, and letting me keep my train of thought without little popups (including “WOW! You have a wifi connection!” and “You’ve configured me not to autoupdate on connections! You have to confirm this for the 10th time today! Right Now! popup popup popup!”)

Installing RDC-2.0.3

(Installing RDC-2.0.3)

Part-and-parcel to this, if I ask for a piece of software, chances are, I want that piece of software. No more, no less.

Installing Remote Display Connection v2.0.3, I suddenly had to quit other Microsoft software because it was forcing an update. You’ll notice above that this is installing Remote Display Connection, it has nothing to do with Entourage.

Surprise hidden update

(Surprise! Hidden update)

… but Aha! You can’t update something secretly if it’s running!

I don’t recall asking for an update. Chances are, I had that software open because I was using it. If I wasn’t, it would not be open. Let’s not force me to stop working just to get more attention, shall we Microsoft? And lets not run updaters or anything else secretly that I didn’t ask for.

I only wanted a Remote Display Connection — nothing more — and only because I’m forced to connect to a Windows server. …because your networking protocol is so bloody weak, I have to use FTP.

Printer Driver Updates — a Nice Start

Uncategorized No Comments »

Apple’s new update has a number of little things under-the-hood — not a showy, glamourous update, but one of “tightening the screws”. Sure, maybe it should have been a 10.5.9 update rather than a for-sale 10.6.0, but it is a lot of hidden work that is often difficult (read: expensive) so needs a transaction to recoup some of the costs. I don’t like giving out cash when I don’t have to, but this is useful stuff.

Some of the changes will probably filter down into 10.5.x, but not all — only enough to reduce their engineering costs of back-ported support issues.

One interesting one is the Printer Drivers Update.

Printer Drivers from Internet

The gist: Software Update will also update drivers for third-party printer.

OK, not earth-shattering revolutionary stuff, but what I see is:
Apple Software Update will begin to update third-party content on your behalf

That’s like updating the extra little free tools I have, such as Adium, sfCubed, MailDrop, Perian, Cha-ching, Visual Hub (if it wasn’t toast), VLC. It’s a step towards that goal, which is really: making it simpler to update.

Google aggregates RSS feed in Google Reader; RSS can easily represent updates with a rich XML digital description; these could be “subscribed to” in Software Update. We therefore have user-selected update channels, just like OpenSource and Linux have (for free).

Vixy.Net-0.1 (SVN r3) for CentOS

RPM No Comments »

Did a quick automake/autoconf on vixynet, and fixed a segfault. Not sure how well it works, but it builds and runs without failing on a segmentation fault, so I’ve added some value. And a trivial man page for kicks. Maybe it needs a self-test suite 🙂

If you want to play further, here it is:

You can grab the patch using rpm2cpio vixynet-0.1-1.src.rpm|cpio -idumB

Freepops-0.2.9 on CentOS-5.3

RPM No Comments »

I got annoyed by the IMs from Yahoo saying “you have mail” — and it’s junk. Nearly-junk. So I turned off the new-mail warning on my Openfire gateway, found that Freepops was broken and not ported recently, and did a brain-dead port. There were changes needed from the supplied RPM (including a buildsystem that tries hard to fix 1/3 of the portability issues that autotools nails like a carpenter).

The RPM Specfile is still a bit trashed, and you can see I nullified the epoch (never should have been invented)

Installed, configured, and POPping mail from gmail already.

Gmail accepts only a few ports for POP (109, 110, 143, 220, 993, 995, 1110, 2221) so I changed my config from the default port 2000 to 2221:
/etc/sysconfig/freepops

#BIND_IP=127.0.0.1
BIND_PORT=2221
LP_OPTIONS="-v -d -l /var/log/freepopsd"

Assuming my own server with freepops installed is y.example.com, and my username on yahoo is [nohide] chickenandporn@yahoo.com[/nohide], my config in Gmail looks like:

gmail POP config with FreePOPs

gmail POP config with FreePOPs

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in