Tuesday, September 25, 2012

Cygwin Ports by way of binary files

Binary Files

I wanted to do some work on an undocumented binary file format. The free HexEdit tool for Windows from Catch22 Software is a pretty good for mapping data structures to the raw binary/hex data in a file.  It uses the C format struct to format the data structures into a human readable format.  It could use some additional docs on how to use the typedef format but was relatively easy to figure out.

What was frustrating was finding a tool that would allow for doing binary diffs with a decent interface.  There are several methods for doing binary diffs on files.  The unix 'od' command, 'bvi' and others presented themselves but were not as interactive as I would like when looking at large numbers of files visually for iterative small changes. Editors and Binary Editors fall into an area of preferences. I could be entering a flame-war picking a tool but would love to hear some feedback on tools people have used.

What I found that seemed to fit the bill for me was Chris' excellent tool called vBinDiff found at his website. Since I wanted to use UNIX tools for scripted automation but still be on a Windows system, I installed Cygwin.  Getting vbindiff to work on Cygwin was a testament to Chris' excellent code base.  After finishing up and getting it working, I thought it might be nice to package it for the Cygwin project.

Cygports

Thus started my journey into Cygport.  I found myself frustrated with the documentation for the assumption that I knew a lot about the Cygwin packaging which is what I was trying to avoid by using the tool. This is not a bashing session for cygport which does an amazing job of wrapping up lots of the trivia that is Cygwin packaging.  What was missing is a basic "HowTo Package ABC" for Cygwin.  The cygport documents while good are written for someone who had done the manual process of packaging at some point.  The documentation failed to meet my expectations as a competent developer who has done lots of porting work to quickly introduce me to this new means of packaging for their platform.  There is not quick guide on the simple cases with a couple of interesting example.  The other lack was how to get these example applications of varied type out of Cygwin easily.  I figured it out and afterwards felt silly for not having seen it.  All that said, I have come the realization that I have to put some time aside and try to write an HowTo guide on packaging for Cygwin.

I've got two packages done so far.  vBinDiff is the first and I am still polishing that install as I learn more along the way. vbindiff is currently working great as a package on my local system. Wy60 is another tool from years back when I worked on UniData/Universe systems and needed access to their Wyse 60 PICK interfaces. This makes for two packages and I have used several features to make these work.  I'll have to learn how to submit a request for inclusion into the main Cygwin package group.  There is a mailing list and a set of questions to answer.  I'll just need to put some time aside for it. :)

Interests 

So those are my current interests in the world of technology.  I keep playing around with the BlackArmor NAS devices occasionally and would like to find the time to get the USB to serial interface setup on my second unit. The ARM gcc tool-chain languishes for lack of time as well. The DLNA server ended up being too much of a pain without a decent tool-chain so I knuckled under and installed Microsoft Media Center on an old laptop to feed my digital media to my xbox360. I really want to revisit that particular issue and get a low-power digital media server working.  Maybe I'll find the time and pick those back up.

Wednesday, February 22, 2012

Debian on BA NAS 110

Hajo on the BlackArmor Forums has an older posting about getting Debian Linux 5.0 (Lenny) installed on BA NAS 110/220/4x0. This is not a port that includes the kernel but simply a minimum install that gets the system setup to install binaries out of the Lenny EABI ARM platform.  The kernel that comes with the BA NAS is compatible with those binaries.  The newer kernel for the Debian 6 or higher is not compatible with the BA NAS. This has some limitations but offers a way to get to some newer software pre-compiled.  I don't want to loose the existing functionality on my test system but the draw to DLNA services is pretty strong right now.

To top it off, Debian has a nicely setup cross-compilation setup documented for people working on non-Intel platforms.  This offers a way to compile newer software without killing myself anymore on building the entire compiler and supporting software myself.

The goal has always been to make the NAS device useful and I want to play my movies off it to my TV upstairs so this might be the next thing I play with on the development NAS.

Saturday, February 18, 2012

miniDLNA

I was reading a bit more on DLNA servers and found that someone had gotten miniDLNA working under the Debian port for the BlackArmor NAS.  NickolasZev looks like he is enjoying his Debian install on his BA110. He is documenting his Debian initial install, adding miniDLNA, a webserver, bittorrent and download manager. I'm not interested in putting Debian on mine and want to stay as close to the vanilla firmware as possible but it is nice to see that someone has it working on the hardware.

Saturday, February 4, 2012

DLNA server for BlackArmor NAS

Today I was reading a couple of forums and bumped into a write up on the "BubbleUPnP - UPnP/DLNA Control Point and Renderer" application for Android that has both DLNA client and server support. The BubbleUPnP setup also has a Java based server mentioned in their section on NAS devices, such as the QNAP which is very similar to the BlackArmor NAS.

Earlier in my writing, I was reviewing a version of Java for the ARM that was called "Sun Java SE for Embedded".  It would allow for executing a Java application on the BlackArmor.  Up until now, I did not have a Java application to really motivate me to install and test this but the BubbleUPnP DLNA server might allow for my BlueRay Play, Roku and Android cell phone to play my movies directly off the BlackArmor NAS.

There is one problem which is getting the ffmpeg library compiled and running. This is described in the docs above for the QNAP NAS but I've not been successful at getting a working toolchain yet.  I may have to backtrack and see if I can just use the toolchain provided by Seagate to compile this newer version of ffmpeg.

Another issue is that the Java SE for Embedded is licensed strangely by Oracle. It cannot be redistributed and requires licensing costs if it is redistributed by a professional package.

So step one would be to compile the ffmpeg library and test it out.  I hope to try that out with the existing Seagate toolchain.  The next step would be to get the Java SE Embedded to run a basic HelloWorld application on the console.  After that, try to get the BubbleUPnP server running.

I'll see if I can get a couple hours together to work on this this coming week. It would be nicer to have an open source DLNA server but I'll take what I can get.  Since I'm talking about taking some time to compile C/C++ code anyway to get this working, I checked on open source DLNA servers and popped up something from eLinux that was interesting to read over.  It looks like MediaTomb, uShare, and Serviio are candidates that could replace the BubbleUPnP server if I get the compiler toolchain working.

We will just have to see how much time I can get together to play around with this.

Saturday, January 28, 2012

Junking Hardware / Cleaning Office

I'm clearing out about 90% of my old hardware from my home office.

Things like my ancient Sun Sparc Station 4 and 5 for my old Oracle work, and the older Sparc Classic (lunchbox), Sparc IPX systems used in my distributed web development days, and the Cobalt RaQ and iMac G3 systems I did development on about a decade ago.  I'm also dumping a Compaq 286 laptop that served me well in doing assembly and C coding and it's cousin the 486 that was my constant companion for several years. The dumping continues with numerous boxes of old cabling, strange and exotic old cards (ISA, PCI, MCA, EISA, VESA, Sbus, and some I don't even recognize now), a couple of engineering sample video cards, some really old KVMs, couple of 24 port serial port concentrators (that I hacked the firmware on) and even a pair of old Cisco 2500's used in my network testing days. It's about 20 years of hardware exiting the house before we do the renovations and addition to my home.

It is really sad to see some of these little guys leave the house but looking forward to a cleaned out home office that I can get back to being a pleasant work and coding environment.  So out the door they go.

In dumping all this equipment, I've been gathering the hardware junk box that I can re-use in other hardware projects.  So far I have two of these boxes with weird stuff like an old Palm 5 docking station, some ear phones, some older coaxial cable, and the other random assortment of hardware junk you find useful when hacking hardware. These two boxes are starting too look really strange like something from a Mad Max movie.

This is cathartic writing about all these old pieces of equipment that were used in my professional and personal learning processes. It's hard to part with some of these because of the happy memories associated with figuring out the next *big* problem in technology for that time.

Good bye little friends and now to start gathering the next set. :)

Thursday, January 26, 2012

UPS and Print Server

I  bought a APC Back-UPS ES 550 awhile back from CostCo without knowing for sure if it would work with the Seagate BlackArmor NAS. It works great so far. I was afraid I would have to hack on the configuration file for the software but it worked out of the box without any extra effort other than enabling the UPS Manager.

I had a second dilemma which was that I use the NAS as my print server for an older Brother MFC 7420 printer and did not want to loose that configuration.  There is only one USB port off the back of the unit that is supposed to work with printers and UPS.  So for my next surprise, I found that it works for both the UPS and printer with an old un-powered notebook USB hub that I got as a door prize at some Cisco event.

I may test plugging up my old 500GB Seagate USB hard disk to that hub as well and see if it recognizes the space and makes it available.

So for anyone else, I cannot vouch for all UPS and printers but my configuration above is working great.