Tuesday, September 8, 2015

Google OnHub - initial impressions

My Google OnHub was delivered this past weekend. Here's my initial thoughts:

  • Packaging was very nicely done. Hardware these days comes in some really beautiful boxes that are well designed. I'd rate packaging 10/10.
  • There are no instructions in the box. None. It was pretty intuitive to get it out of the box and figure out what to do, but I did hear from a friend that he wasn't sure how to get the outer shell off. He didn't want to break it by pulling or twisting the wrong way.
  • Initial setup using an iPhone 6 with iOS 9 beta failed. After connecting to the setup Wifi network, the Google On app would never find the OnHub. I worked on this for about 45 minutes before giving up and trying the setup on an iOS 8 device. Setup worked perfectly.
  • Once I figured the whole iOS 9 thing out, setup was so simple. Great job on making it painless!
  • Wifi signal strength in our house has had a major upgrade. Corners of the house that were always very weak signal now have full strength connections.
  • Throughput for both wireless and wired clients test out with speeds matching our service from Comcast.
I also like that I do not have to be connected to the local network in order to manage the OnHub. So, when someone at home can't connect, I can open the OnHub app anywhere I am and manage the network (so long as my home Internet connection is up). That's pretty cool!


Friday, August 28, 2015

Updating battery firmware on Phantom 3 intelligent batteries

A few days ago I picked up my first drone, a Phantom 3 Professional. It's so much fun!

Last night I went through the firmware update process, following the instructions from DJI. The instructions were clear enough to get the firmware updated on the aircraft and the controller, but the battery firmware was a bit confusing. Here's the part from the instructions:
The Intelligent Flight Battery is upgraded during the aircraft firmware upgrade process. It is recommended to keep the upgrade package files in your SD card. The upgrade will start automatically after power cycling the aircraft.
I assumed (correctly) that my battery firmware was updated, but I wasn't 100% certain how to upgrade my spare battery firmware. To do that, you need to:

  1. Put the spare battery into the aircraft.
  2. Place the firmware update package in the root of the SD card. You can just leave it there.
  3. With the controller off, turn the battery on. The upgrade process will kick off.
  4. Once you here a long beep, short beep, pause, the upgrade is complete.
Rinse and repeat with all of your spare batteries.

Sunday, June 3, 2012

Powershell AuthorizationManager check failed

While debugging some Powershell scripts today, I started getting an error:

AuthorizationManager check failed.
At C:\Users\pkearne\setupPLT.ps1:6 char:14
+ ./logging.ps1 <<<<
    + CategoryInfo      : NotSpecified: (:) [], PSSecurityException
    + FullyQualifiedErrorId : RuntimeException

After some web searching, there seems to be two primary reasons this happens:

  • An empty Powershell profile script
  • WMI service not running

Neither of these cases was true for me. However, the first one pointed me in the right direction. Somehow a script I was calling out to (logging.ps1) had it’s contents removed. Had the file been deleted, the error would have been that the cmdlet, function etc was not recognized. But having the file present but empty gave the misleading error “AuthorizationManager check failed”.

So, if you are getting this error and everything else looks correct, look and see if something similar is causing your problem.

Tuesday, November 29, 2011

Remember, controller classes need to be public

File this one under Duh! I was troubleshooting a routing issue I was having with a portable area in ASP.Net MVC. For some reason I kept getting a 404. The solution was pretty big, so I created two new projects to try and isolate the problem.

I created a new web project and a class library for the portable area. Added my routes to the area, created a new class, renamed the class MyController, wired it all up, and got the same thing.

I installed Glimpse to see what routes were being hit. But Glimpse only works if ASP.Net handles the request, and since it was a 404, I couldn’t see the Glimpse data.

So I installed Phil Haack’s awesome route debugger. The route debugger has a catchall route, so even if the request would result in a 404 it will return you back the debug information. I could see that the route was being hit, but it still 404’ed.

I set breakpoints. I added some logging. Nothing would cause my controller action to get executed.

Then it struck me. Visual Studio by default creates new classes without an access modifier, and when no access modifier is specified, the default is internal. MVC needs controller classes (and the action methods) to be public so they can be constructed via reflection.

using System.Web.Mvc; 
namespace TestArea.Controllers
{
   public class MyController : Controller
   {
       public ActionResult Index()
       {
          return View();
       }
   }
}

The really sad part is I just helped a colleague solve the exact same problem the week before.

I don’t know why Visual Studio defaults to not putting a access modifier on new classes. I always prefer to be explicit with such things.

Thursday, May 12, 2011

VerificationException: Operation could destabilize the runtime

I came across this exception this morning while playing with RavenDB. A quick search shows several people have seen this exception but not a lot of solutions.

I’m not sure why, but this exception in my case was related to IntelliTrace. I turned IntelliTrace off and the exception went away. Weird.

BTW - this isn’t related to RavenDB. According to this post, the issue is a bug in IntelliTrace.

Tuesday, May 10, 2011

VB6 and .Net Interop Fun

A friend of a friend asked me to help with a project. He is a VB6 developer. Still. But he needed to incorporate a .Net component into the VB6 application in an easy way. So I’ve been helping him out, building up a .Net control using the Microsoft Interop Toolkit. It’s a free add-in to Visual Studio that takes away a lot of the complexities in building COM interop components in .Net.

I learned something painfully recently while helping out:

If your .Net control throws an exception, VB6 will report that to you as an “out of memory” error.

That’s it - no details, call stack, or anything else about the actual exception. Misleading and frustrating. Not that I would expect VB6 to give me the call stack from .Net, but “out of memory” is not only unhelpful but it is disinformation.

I should have remebered this one. We were getting the “out of memory” error in VB6 in design mode and couldn’t figure out what the problem was. The error popped up immediately when opening the form designer in VB6. After much trouble trying to get VB6 to actually tell us what the problem is (we never got any information out of it, even after enhanced interrogation using WinDbg), it was real simple - we had a bug in a property setter. When the control was instantiated, VB6 was calling the setter, getting the exception, and then barfing with the incredibly unhelpful error message.

My friends will inevitably laugh and make fun of me for playing with VB6 still. That’s fine. I’ve found the experience has led me to develop additional skills and learn more about .Net development along the way.

Sunday, April 3, 2011

DasBlog: Fixing 404’s for mapped urls

Two things have been bugging me since I migrated this blog over to dasBlog: I started getting a bunch of 404 errors for urls that are mapped to dasBlog handlers, and getting a better html editor wasn’t working.

404’s for things like deleteitem.aspx, blogger.aspx, etc.

This fix was simple. I am running this site on Windows Server 2008 R2, and the application pool was in Integrated Mode. Switching to Classic Mode got all of the handler mappings working. I’ll need to dig around in the web.config to get the handlers migrated to IIS7.5 syntax so I can go back to Integrated Mode. This fix also got comments working.

Setting TinyMCE as the editor

I had downloaded the TinyMCE editor adapter from John Forsythe, but it never worked. There seemed to be people with similar issues, but no resolution. This was even worse for me, because since I was getting 404’s for blogger.aspx, I couldn’t use Windows Live Writer either. I resorted to handcrafting my html. Yuck.
This one was simple to fix, but I didn’t figure it out until I installed the wonderful ELMAH. Looking at the Elmah logs showed this error:

tinymce\jscripts\tiny_mce\tiny_mce_gzip.aspx(5): error CS0246: The type or namespace name 'ICSharpCode' could not be found (are you missing a using directive or an assembly reference?)

In the installation instructions, it said that you don’t need to install the ICSharpCode.SharpZipLib.dll, because it’s the same one installed with dasBlog. But the version of dasBlog I was running didn’t have that assembly. A quick search and download, and voilla – TinyMCE is working!