Showing posts with label technical. Show all posts
Showing posts with label technical. Show all posts

Thursday, August 2, 2012

Little Tech Tricks

As this doesn't fit my usual genre of blog post, here is your fair warning: this is another of my technical posts. :)

So I've recently switched to a Mac Mini in one of my spheres of influence. It's been challenging; missing or stolen keyboard shortcuts still miff me, but several things have worked well for me:
  1. Mou. This is a Markdown editor for Macs (OS X). I have tried about a dozen in Linux, Windows, and OS X and this one takes the cake, kicks butte, `sudo rm -rf /`, and any other superlative expressions of high marks you wish to contribute. It's shiny. It does real syntax highlighting. It isn't cross-platform. :( Above all, though, it scrolls with you as you type!!! Now, as you're typing notes in class or composing a blog post, you can see what you're typing rather than scrolling back to the bottom after every change you make.
  2. I play with hardware. This means that I need to use serial communications fairly often, and Macs kind of suck in this department. Windows and Linux both know that a standard USB COM port is; BSD/OSX needs to be told. For the most common of these, FTDI provides their own solution. It works rather well. If you don't want to go through the effort, OSX lets you attach any USB device to a Linux virtual machine (I like VirtualBox) and let a real operating system do the dirty work. (This works for charging the Motorola W755 phone on macs and for reading EXT2/3-formatted USB devices as well.) Remember to install the Guest Additions.
  3. EXT2 R/O access: MacFuse combined with fuse-ext2 will at least get you started.
  4. iTerm2. If you do any amount of work on a terminal, iTerm2 is here to save you from xterm and Terminal. One problem; several standard keyboard shortcuts are AWOL. Lucky for you, ShadowFiend and his commenters have been gracious enough to show the world how to fix this.
  5. BetterTouchTool. This is how I got enough gestures and taps (middle click anyone?) working to be somewhat productive once again on OS X.
  6. IRC. Several programs exist that fill this need; I'm enjoying Colloquy at present.
  7. Google Calendar/iCal integration.
Also, I've had the opportunity to set up and modify several servers in a professional capacity of late, and a couple of articles I found are worth mentioning, if anything for my future benefit.
  1. HTTP Basic authentication. There is a simple Perl command that generates encrypted passwords. (A better article exists but was not found by me.) While Basic Auth is a terrible choice for strong security, it has many handy little uses and this makes administering those a bit easier.
  2. How to get an SSH Key's fingerprint. Useful when lots of little keys are running around nekked. 'Nuf said.
I hope you find something here useful. Happy Thursday!

Monday, March 19, 2012

Xilinx Design Suite 13.4 on Ubuntu

Oh hai!

You're probably here because you're having some trouble installing the Xilinx ISE Design Suite v13.4 on Ubuntu 11.04. Aren't blog post titles great?

Well, here's the problem I was having after I successfully installed it as root:

$ export LD_LIBRARY_PATH=/usr/lib/firefox-11.0 # this was a hack to find the real error
$ source /opt/Xilinx/13.4/ISE_DS/settings32.sh
. /opt/Xilinx/13.4/ISE_DS/EDK/.settings32.sh /opt/Xilinx/13.4/ISE_DS/EDK
. /opt/Xilinx/13.4/ISE_DS/ISE/.settings32.sh /opt/Xilinx/13.4/ISE_DS/ISE
. /opt/Xilinx/13.4/ISE_DS/PlanAhead/.settings32.sh /opt/Xilinx/13.4/ISE_DS/PlanAhead
. /opt/Xilinx/13.4/ISE_DS/SysGen/.settings32.sh /opt/Xilinx/13.4/ISE_DS/SysGen
. /opt/Xilinx/13.4/ISE_DS/common/.settings32.sh /opt/Xilinx/13.4/ISE_DS/common
$ ise
XPCOMGlueLoad error for file /usr/lib/firefox-11.0/libxpcom.so:
/opt/Xilinx/13.4/ISE_DS/ISE//lib/lin/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/firefox-11.0/libxul.so)
Couldn't load XPCOM.
[ errors about not finding library ieee ]

Turns out it ships with libstdc++ v. 6.0.8. Ubuntu 11.04 is currently at v. 6.0.14. To solve this library version conflict, simply put '/opt/Xilinx/13.4/ISE_DS/ISE/lib/lin/libstdc++*' somewhere safe and replace them with symlinks to `/usr/lib/i386-linux-gnu/libstdc++.so.6` and it should come up just fine!

Monday, February 20, 2012

aPod Touch Thingy

Last winter I got a new dumb phone.

I broke the dumb phone.
Last summer I got a smart phone.

I am presently using the dumb phone's predecessor, the hardy (if quirky) Motorola W755. It does what I want for the price I want.

The smart phone was from a friend of mine. It was used. I called Verizon and was informed that it would take an enormously expensive (to me) dataplan in order to use the oldest Droid in existence.

Did you know these things have pretty good Wifi support? Apple does. An iPod Touch is basically all of the computing power and sensory equipment of a smart phone without the "phone" aspect.

I hereby coin the term "aPod Touch" to designate a phoneishnessless Android smartphone. It's actually kinda fun to have a pocket-sized Internet-capable computer handy even when my laptop is out of battery. Instead of Googling certain classes of things, I find apps that are specialized in that field (ElectroDroid comes to mind). It's battery lasts around 36 hours, a lifetime no laptop I know even tries to match.

So when you see that I have a smart phone, "Mr. Richy-Rich" is a misappelation. When you see that I have two phones, realize that the "inferior" one is the better one, and that I'm liking abusing the poor "superior" phone as a poor replacement for a laptop.

Wednesday, July 27, 2011

nginx 405 Not Allowed

Ever since I was two I have reacted strongly to being told no.

"No you can't" sometimes even brings resentment.

"No you can't, you never will, and you can't change one thing" riles me like nothing else. (well, ok, maybe other things rile me, but whatevs)

For a tool like nginx, a good, capable web server, to repeatedly tell me "405: Not Allowed" is not cool. at. all.

For those of you who aren't terribly fond of technical discussions but are reading this for other reasons, you are perfectly welcome to ignore anything past this paragraph. Thanks for reading. :)

For those who have been Googling this for hours, please stay with me:

For one, nginx caching is powerful, and if you're using version 0.8 or newer it is most likely not the problem.

nginx is smart. If you try to HTTP POST to a static page, it will complain. POSTing is only useful for pages backed by server-side code (in my limited experience).

"But," you might say, as I did, "My nginx.conf very carefully guides all requests to my dynamic web server using the proxy_pass parameter!"

Remember how your nginx.conf uses those pesky semicolons? Think of C. Shudder. Reminisce if you like-- my point is that nginx.conf is, after a manner, a procedural programming environment. If you put your root server block above your dynamic server block, it will interpret them in the order it read them. Every time.

Solution? Change the block order or--as I did--merge the blocks and drop your "location /" section down to the end.

I hope this helps you. Good luck.

:)

Saturday, June 11, 2011

Getting Kinected

Yes, the pun...is horrid.

So today I finally decided to hook my Kinect up to my computer.

It's pretty cool.

I can get a rough depth map of the room, 640x480 webcam imagery, cool-looking near-IR imagery, and sound using it. I can also manually tilt it up and down and blink the LED.

How? I thought you'd ask.

LibFreenect is what I used. I'm running Ubuntu 11.04. While this article provides a fairly good tutorial, it is a bit outdated. I followed his instructions roughly. His dependency list is fairly good, but I had to build and break it a couple times to find out which other packages I needed. Note that if it breaks on libxyz, you'll need libxyz-dev.

First, I cloned libfreenect's git repository. Entering that directory, one finds a nice cmake-based system that I don't understand at all.

Simply:
mkdir build
cd build
cmake ..
make
As per the instructions linked above.

Now this is where his instructions are outdated:
cd bin
sudo ./glview
Tadaa! You should now be viewing the depth map and webcam input in a nice big little window. :)

Notice that after the program finishes initialization, it dumps usage information.
w = look up
s = center view
x = look down
f = change view modes (near-IR and two(?) webcam modes
LED controls:
0 = off
1 = green
2 = red
3 = amber
4,5(?) = green, steady blink
6 = red-amber alternating

I has toy. Is happy. Now, to get AJ's pet project working with it...'cuz a Gumstix Tobi with a Fire CoM would totally run it. :D

Wednesday, May 11, 2011

Ubuntu 11.04: Whaaaaat?

Stupid cousin.

Most of those reading won't find this useful. I do like feeding Google, though, so here goes...

I recently upgraded to Ubuntu 11.04 from 10.10.

I am presently engaged in hating it.

Unity was a giant WTFreak era during my adoption, but a few minutes from a friend who 'gets' it helped loads. Now it's just three (big) complaints:
1: Meta-T used to be user-defined by me to open a new terminal. It now brings up the Trash Can. Seriously?!?!?! The Trash Can? Who hotkeys that, and THEN ignores the user-defined overrides?!
1.5: Why do I want a touch-capable interface with my touchpad and mouse? If my touchpad acts like a one-button mouse, how do I do anything? Hobbling along under Gnome is much more feasible.
2: Multiple Desktops. One X session over multiple displays has dead space that makes me nervous, so I use the ATI Catalyst configuration tool to set up multiple X sessions. My initial survey of all my options indicates that Unity has No Concept of this. I have no UI (aside from limited desktop-right-click-menu access) on my second monitor. Anyone with this issue may be interested in running "metacity --replace &" as a functional hack under Ubuntu Classic.
3: Widgets. I want a live CPU usage, temperature, and clockspeed display on my screen. No, pinning apps to the dock WILL NOT WORK. I tried. It doesn't do dynamic icons. Also, I already have my favorite Gnome apps. (Ubuntu 11.04 already killed my temp monitor app.)

Firefox 4.
Why did they rename "Organize Bookmarks" to "Show all bookmarks"??? Really?
New UI? Getting used to it. It is enough like the last one to struggle through it. (Stop Now! If I Wanted Chrome, I Would GET Chrome!!!)

I just spent an hour fighting with it. There is no clear winner. Am I frustrated? A little bit. I'm sure you can't tell.

Monday, March 28, 2011

Computer Engineering

Though I walk through the valley of the shadow of hardware,
I shall fear no kernel.

And, y'know, I'll pwn the invading recognizers in hardware.

Saturday, March 12, 2011

Linaro Start Line

So, for work I've been asked to get a hang of the Linaro (www.linaro.org) toolchain.

What the heck does that mean?

More importantly, how can they reorganize their website so one can rapidly get started?

Well, first off, Understand who they are. Get on their IRC channel and ask questions--especially about where to find information.

See, I'm to do some kernel work, so I need to cross compile things. I need a full operating system to drop them in. Every time I try to Google or navigate their pages to find the processes I just read about so clearly, I get confused.

Thus I'm posting a tentative index to the learning curve pages.

Linaro is a set of programs that make it easy to build a ground-up ARM-based system. Presently Angstrom and Ubuntu (and one other?) have prebuilt images made with the toolchain.

I found that the best place to start is an impossible-to-find wiki page that links to several of the many HowTo articles available elsewhere on the site:
https://wiki.linaro.org/Mentoring/HowTo

Process to install an image:
Get an OS-specific image (a pain, more on this later)
Get a hardware-specific "hardware pack" (Not so hard...I think)
Run "linaro-image-create" with a slew of (well documented) arguments (more on linaro-image-create in a moment)
Plug in card
Boot

This "linaro-image-create" tool has a forest of voodoo behind it, most of which is designed to be hidden. This, of course, means it has some dependencies. If you're running any of the supported boards (run it with only certain arguments and it'll dump a list), it's a matter of enabling the PPAs (more on that later) and installing two packages, gcc-gnueabi-*? and linaro-image-tools. I think. I'm doing this on my machine as we speak.

OK. So I need to find the images. This has been a pain. The "Images" link on the page above isn't helpful.

AHA!

So, from Mentoring/HowTo, go to "Booting Hardware with Linaro Tools." I have a Gumstix Overo board, so that's what I followed from there. (Note the link down below to generic instructions for linaro-media-create.)

Here is where we install linaro-image-create. Follow the instructions at "https://wiki.linaro.org/Boards/Overo/Setup". (This page is rendered partially redundant by this wiki page, but valuable things are said here if you're running any Ubuntu 10.10 or earlier.)

This next part takes a touch of magic for me, as I'm running Ubuntu 10.10. See, the linaro-image-create that is in the PPA is too old to support Overo boards. (This won't be the case in Ubuntu 11.04 come April or May.) This means I need the bleeding edge build of linaro-media-create. (4.3 worked fine for me.)

Bleeding edge comes with a price: Dependency Hell. No matter what we do to shrink it, this special place will forever haunt those who strive to wander far from the well-trodden paths of software usage. I kinda like it sometimes--it's a big puzzle game.

In our case, the README that comes with linaro-media-create specifies two dependencies that can't be satisfied by Ubuntu 10.10:
python-debian >= 0.1.16ubuntu1
qemu-kvm-extras-static >= 0.13.0

I found it trivial to find the prerelease package of python-debian of a high enough version and get it installed. (http://launchpadlibrarian.net/49675715/python-debian_0.1.16ubuntu1_all.deb) (note that I did this AFTER installing linaro-image-tools the ordinary way, thus establishing its dependencies.)

qemu-kvm-extras-static is another ball game. See, it doesn't actually exist in 11.04. The tinyurl addresses provided give you small 7kB packages that install seamlessly but do nothing. (They are meta packages that will make the upgrade smooth, but this idea breaks when we pull single .deb's at a time.) At the time of this writing, the package you need is actually qemu-user-static, 0.14 or newer. Without this step it will crash saying that certain instructions are not understood by the emulator.

Once you find THAT (wget http://launchpadlibrarian.net/65940960/qemu-user-static_0.14.50-2011.03-1-0ubuntu1_i386.deb), however, invoking linaro-media-create from the place it was untarred to should work.

You'll notice that the syntax of linaro-media-create is fairly straightforward, yet fairly involved. (I used "sudo ./linaro-image-tools-0.4.3/linaro-media-create --mmc /dev/sdf --hwpack hwpack_linaro-overo_20110202-0_armel_supported.tar.gz --dev overo --binary linaro-natty-headless-tar-20110203-1.tar.gz") It requires two files be handy: the system image and the hardware pack. The Overo/Setup page hard-codes some possibly outdated images into their command lines. Here is how to find your image:

Go to https://wiki.linaro.org/Releases#Obtaining%2520and%2520Testing%2520Linaro%2520Images
Scroll down. Some structural details are located here that are nice to read, but we're looking for the headers "Evaluation Builds" and "Developer Builds." (Here GUI/no GUI and system size are required decisions.)

Aw Crapola. It seems at the time of this writing that these links link fine...but the pages they link to are blank. Lovely.

I pulled mine from
http://releases.linaro.org/platform/linaro-m/hwpacks/final/hwpack_linaro-omap3_20101109-1_armel_supported
and
http://releases.linaro.org/platform/linaro-n/headless/alpha-2/linaro-natty-headless-tar-20110203-1.tar.gz
per my decisions earlier. (Use the root URLs to find the latest and greatest of these.)
I'm not sure why mine worked with the hwpack a different version from the build.



Plug in the card you just made and try to boot.

I have yet to need the "sleep hack" or to encounter the bug listed here: "https://bugs.launchpad.net/linaro/+bug/728734?comments=all".

TODO: prettify and integrate with wiki.

Thursday, February 10, 2011

Crowbars

If you do something stupid with an electronic power supply, sometimes they are equipped to sense it and throw a crowbar across the output to protect the insides. Picture a Jacob's Ladder running, an evil scientist cackling maniacally, and a hero sneaking through the shadows carrying a crowbar--he then poises to cast his payload into the crackling storm of electricity--

If you're reading my blog, you probably know by now that something rather technical shows up once in a while. This is one of those posts.

I'm checking out a Con Avionics HS26-13.5 analog power supply. It weighs a good 30 lbs. and is rated at 24-28 VDC at 13.5 A. This particular unit has been dropped on its head. The front right top corner has been displaced a good inch into the volume of the machine.

I could tell the case would short a couple of contacts inside if it were powered up, so I resolved to get the cover off. Well, first thing to do is take an odd silver (matte aluminum) box off the back. It's a -Con Avionics OVH26-13.5. Google says "con avionics ovh26-13.5" doesn't exist. At the moment I think it's merely a sophisticated external overvoltage crowbar circuit.

It's connected across the output. It has large bolt-mounted diodes or SCRs of some kind and an MCR648-2 mounted on the outside on a moderate heat sink. The supply is "HS26-13.5" while the attachment is "OVH26-13.5," so it seems to me we have Over Voltage Handler or somesuch with a common voltage-current pair with the supply proper.

Saturday, February 5, 2011

Making Kinections

So, I'm the proud owner of a brand new XBox 360 Kinect bundle.

I'm kinda giddy about it.

I'm quite happy about many other things too, like my internship.

See, internally it's a specialized PC (i386-compatible? ia64?) architecture. It plays fun games. It's one of the later revisions of the hardware, so ring-of-death and other issues have been worked out by all those who came before me. (Thanks!)

Also, the Kinect (with a $35 addition) can plug into the PC and use the libFreeNect driver to pull the 3-D and other informations out of it that the games on the 'Box can. See, I don't think dancing in place in front of a camera in order to make a figure on screen pretend to imitate me is going to be much fun--but driver and algorithm development, THAT will be awesome. :)D

I'm also pondering looking into rooting the box and installing Linux--but that'd require a hard drive as the installed nonvolatile memory is only 4GB. Also, I value it's Halo capabilities a touch more than I value its Linux or computing power. (What's in those things, anyway?) (I had to look it up. Check out the wikipedia article on its internals. Apparently it would be sweet for raw power's sake.) Thus, I probably will put that task off for quite some time. (I really wouldn't mind running Windows on it--I'd just love to have a general-purpose 3-core 64-bit PPC machine of my own.)

Biggest uses for it? Playing DVDs, playing games lots of people can play, and hacking the Kinect. That's about it. :)

(Microsoft, will you Please please please pretty please allow Steam to operate on XBox Live? I might even consider that grounds on which to get a paid subscription.:P)

Thursday, July 29, 2010

Eratron PPC 8200 and family

Howdy!

You're no doubt tearing your hair out looking for some tidbit of technical data on a piece of Eratron equipment. Me too. I've found a few things that might help you:

Eratron is another name for ERA, or Energy Research Associates that was based in or near San Francisco some time ago. (Source) The patent application mentioned below indicates it was Campbell, California.

They patented their electron beam power supply design. It's rather brilliant compared to the more conventional design the Mideast Industries PR-40 uses, but its brilliance shows up mostly in electron beam applications where output arcing is not uncommon.

The patent number is 4,314,324. If you use the USPTO site, you'll want to go to http://www.uspto.gov/. In the left column under Patents click Search. Scroll down to the heading "USPTO Patent Full-Text and Image Database (PatFT)" and click on either Patent Number Search (if you want just the text) or View Patent Full-Page Images (if you want the partial schematics). Enter the patent number on either page and it'll zap you right to the patent.

Now if you're like me, the computer will be grumpy and not show the TIFF image the image viewer embeds. If this is the case, right click on the side of the page, select View Source, scroll down in the new window to the bottom and start looking for:

<embed src="/.DImg?Docid=04314324&PageNum=1&IDKey=219CCF24E627
&ImgFormat=tif" width="570" height="840" type=image/tiff></embed>

Now for a bit of surgery. Take the URL you've found for the image viewer. For me it was:
http://patimg1.uspto.gov/.piw?Docid=4314324&idkey=NONE

Snip up and paste together a Frankenstein URL using the first half of the image viewer URL and the embed tag's data:
http://patimg1.uspto.gov/.DImg?Docid=04314324&PageNum=1&IDKey=219CCF24E627
&ImgFormat=tif

Paste that into your address bar and the image should come up after thinking a bit. Now, see that PageNum=1 bit stuck in the middle? You can use your original page viewer to see how many pages there were and what sections they were divided into to navigate simply by changing that one number.

Cool, eh? :) I thought so anyway. It's a simple hack. If you want to actually read the images or keep them, you can use a tool like wget with the Frankenstein URL to pull the TIFFs straight off the server.

Have a nice day!

...and remember, 3-phase can kill you. :)

Thursday, June 24, 2010

Where has the Wavetek 195 Gone??

I was recently asked as part of my employment to find a manual for a Wavetek 195. After much Googling and hunting and prodding and sifting, I found absolutely nothing. This is why I'm writing this post.

The Wavetek 195 was renumbered as a Fluke 282.

It's that simple. I had to call Fluke, ask, and be called back as they had a hard time rediscovering this fact for themselves. The Wavetek 195 shows up in exactly one document in all of their internal systems, and that document is what you, the reader, can find for yourself. It's about 1 page and not terribly useful.

Oh, mergers...what fun! ;)

Monday, June 14, 2010

Motorola Droid disassembly

Taking things apart is fun...especially when it was expensive, has been replaced, is out of warranty, and needs fixing. So my boss handed me his recently bathed Droid to take apart, rinse out with ethyl alcohol, and reassemble. A brief Google search found these two links:

Dr. Wreck's Motorola Droid teardown
Note commenter Jeremy on the second page of comments.

Dr. Wreck's analysis of the carnage


These are nearly comprehensive and very impressive. However, I would like to insert an omission or two.

When pulling the back cover off, there is a black flat piece that runs along the top (camera end) of the battery compartment that needs to be pulled down as it has two tabs around the first silver torx' socket's base.

Note that the mic will lift right out.

The antenna board seems to be glued in, but it doesn't seem to interfere with removing the edge cover so I didn't remove it during disassembly.

Keep track of the three buttons: I nearly lost one to the floor. One doesn't come out until you remove the edge connector.

This phone has a sticker under the battery that holds a significant part of the edge cover down. Peel this back, lift the screen-ward edge in the direction of the back of the phone and the opposite edge will disengage towards the front of the phone.

The screen mount has NINE (9) screws holding it in. Five you can see with the phone open and four you can only get to with the edge cover off. I am presently having incredibly amounts difficulty getting the center right keyboard edge one to come out. Judging by their use of glue in holding the edge connector on, it has probably been loc-tite'd into place so it's brutally obvious to a trained service tech when I have invaded the inner sancta of the phone... EDIT later today: every device has failed to break the screw loose, so I had to drill out the head.

Also keep track of the various rubber buffer pieces on the main board. In my considered opinion and lack of specific experience, they can hide water damage and are essential to vibration protection.

UPDATE: Even with two separate water damaged Droids, no combination was successful in restoring life. Luckily, my boss' Droid was still able to recognize a USB connection and dump anything useful onto his PC.