Daniel's Stuff

I write code

Drobo Pro/FS

After working through it a bit more it appears that the problem is actually in the Drobo Dashboard.  For some reason it is refusing to show the “Drobo ProFS”.  I loaded up the 1.8.4 version of the Drobo Dashboard and it sees the unit just fine but doesn’t allow much to be configured.  Maybe I will need to write my own client to get at all the functionality….

Breathing new life into my Drobo Pro

I recently saw a post somewhere that showed the internals of one of the newer high end Drobo machines.  It appeared to use the same motherboard as the Drobo Pro I have sitting here on my desk gathering dust so I decided to take another look at what I could do with the thing.  I had previously opened the machine up to get around the rebooting problem by disconnecting all the batteries with some success and in the process discovered the on board serial ports.  It turns out they have a dual core processor in them running completely different OS code on each. One running Linux and the other running VXWorks.  The linux one gives a plain old shell with lots of interesting stuff running on it.  The VXWorks one doesn’t give much though.  From what I can see the VWWorks side handles the actual disk access, while the Linux side handles the “UI” side of things, such as iSCSI on the Drobo Pro or file sharing on the Drobo Pro FS.

IMG_0404 IMG_0405

 

To get to the meat of the matter, I downloaded the firmware for the Drobo Pro FS and tried loading it into the Drobo Pro, which of course it rejected as I was expecting.  I then had a look at the firmware files and saw they both had a very similar header.  After patching the firmware file with the correct header values (an exercise for the reader to find the correct 12 bytes to alter) I was able to load the Drobo Pro FS firmware successfully into my Drobo Pro.

At first it didn’t seem to boot, but after putting some fresh disks in and rebooting the unit, up it came. :)  At the moment the device doesn’t show up in the Drobo Dashboard, but it does present a public share, so it’s not a complete loss.  I also took the opportunity while I had a serial cable plugged into the board to enable the telnet and ssh servers to allow me to poke around some more.

It looks like the control software on the unit is expecting there to be two ethernet ports while the physical hardware only has 1.  I may need to patch the binary…

 

 

Titanium Appcelerator == yuck

After spending considerable time recently working on a fairly simple iOS app using Titanium Appcelerator I have come to the conclusion that I am never going to use it again if I can avoid it.  The app size isn’t too much of a problem, but the fact that even this simple app crashes on startup on some devices makes me very nervous.  I was hesitant to use the product at the start of the project, but the client wanted to be able to produce an Android app from the same code base, so I agreed.  I suspect that I would have been able to build both apps from scratch using the native tools by now even though I’ve never made a production Android app before.  Live and learn I guess.

VMWare or Parallels?

Since Parallels released the new version of their Mac virtualization software recently and it reportedly works under OS X Yosemite (10.10), I decided to give it a go.  Converting my Linux VMs was a breeze, but converting my Windows 7 VM wasn’t as much fun.  The Windows VM converted perfectly, Windows itself on the other hand decided it needed to re-authorize.  Once I sorted all that mess out (another story for another time), I was able to get back to work.

So far I’m pleased with the performance of Parallels Desktop 10 for Mac.  It seems to be running better than when I was using VMWare Fusion 6.0.  I don’t have any solid numbers on this, but the fans in my Mac seem to not run as often under Parallels.  Booting my main Linux VM is almost instantaneous, and my Windows 7 VM seems to be running really well :)

I finished another PIC32 proto board

It is a lot smaller that my previous one and fits better into the breadboard :)
I think I have also figured out why many of my PIC32 projects were crashing randomly.  It appears I was setting the oscillator up incorrectly which was causing the lower spec PIC32MX2xx to try to run at the same speed as the higher spec PIC32MX7xx.  Oops ;)
The interesting thing is the PIC32MX2xx parts will run at the same speed as the higher ones as long as you keep them cool.  Unfortunately my office has no air conditioning so during the summer months it is not uncommon for it to get into the 40C range.  During the winter months as I am currently experiencing this isn’t a problem ;)

Swift Parser Generation

I’ve been fascinated by the Scala language since I first saw it. I’ve been fortunate enough to be able to use Scala in a couple of projects. One of the parts of the Scala standard library I really like is the parser combinator stuff.  I’ve been spending a bit of time recently playing with some ideas as to how something like it could be made for the new Swift language from Apple and I’ve made a first cut here.

It still needs a lot of work, but at the moment it is usable.  What I’m thinking is I will use it as the basis of a much nicer one that follows the Scala version more closely now that I have a better understanding of how Swift works.  I doubt I’ll be able to make it a nice as the Scala one, but I may be able to get close with any luck :)

 

The first stage of my port of pegged to Swift is successful :)

I have managed to get the Objective-C version of pegged to spit out a parser using Swift rather than Objective-C :)

It’s getting late, so I really should get some sleep.

I finally figured out what was causing the compiler to crash.  The following code will crash the Swift compiler unless the inout parameter to the block type is removed.

typealias MathFunction = (a: Double, b:Double, inout x:Int) -> Double
var counter = 0
class Executor {
    var fn: MathFunction
    init(fn: MathFunction) {
        self.fn = fn
    }
    func execute(a: Double, b: Double) -> Double {
        return fn(a: a, b: b, x: &counter)
    }
}

Swift compiler is crashing for me :(

I’ve been spending a bit of time having a play with Apple’s Swift.  So far I find the language to be interesting.

It seems to be missing a few things.  Working with strings is a real pain :(  Hopefully this will be fixed in later versions of the language/compiler.

I’m also hitting many problems with the Xcode 6.0 beta crashing, but more annoyingly after getting a fairly large amount of Swift code ready it seems to be crashing the compiler :(

I’m trying to port the pegged parser generator to swift.  The first step is to update the existing tool to generate swift as output.  This I got working fairly quickly, then it was down to fixing the various syntax errors and learning how things are done in Swift.  Now there are no syntax errors, but it still won’t compile :(  Ah well.  Maybe I should just have a go at writing one from scratch ;)

PIC32 Prototyping

I’ve been thinking for a while that prototyping stuff with the DIP PIC32 parts should be easier, so I built something over the weekend to make that a reality. 

Instead of this:

IMG_0103

I can now start with this:

IMG_0099IMG_0102IMG_0100IMG_0101

It is just the bare minimum to get a DIP PIC32 part up and running with USB support.  I’m pretty happy with the results so far.  Now all I need to do is get a USB boot loader that fits in under 3Kb and I can use the Chipkit32 stuff with these little guys ;)