Scott Hanselman

Choosing the right Portable Power Phone/Tablet/Gadget Battery Charger

July 26, '13 Comments [18] Posted in Hardware | Reviews
Sponsored By

microusb-vs-miniusb[1]I travel a lot and I've talked about the importance of having power while on the go. I carry a small Four Outlet Mini Power Strip, for example, as well as an all-in-one travel plug adapter. I like tools and gadgets that solve more than one problem and/or have multiple-functions.

Until phone and tablet batteries batteries can last for a day of solid use, I also carry a portable battery charger. In fact, I have been testing a bunch over the last few months in search of the Perfect Portable Battery Charger. Spoiler Alert, it doesn't exist yet, but each of these chargers has one of those characteristics.

What do I want? I want a 8000mAh or greater portable charger that weighs less than a pound, has a USB port. It should support a full 2A output for iPads or large tablets, but at LEAST 1A for phones. Bonus points for built in cables for iPhone and micro USB. It should have Solar for emergency charging. Bonus points if it can charge two phones at once, or at least take a 2A load. The fewer dongles or adapters I need to carry, the better.

NOTE: For reference as you read, here's mini-USB vs micro-USB using a photo from PowerLet and Rob Jackson.

What kind of charger do I need?

As you look at these devices and their Pros and Cons, ask yourself these questions:

  • How many times will I need to charge a single phone in a day?
    • Look at your phone's battery and see if one of these batteries will charge it once, twice, or ten times.
  • How large a battery do I want to lug around?
    • Some of these are the weight of your phone, one over a pound and a half. You WILL notice that.
  • Do I live somewhere with a lot of sun and not a lot of outlets?
    • Consider a solar charger, especially if camping (or urban camping)

WakaWaka POWER Smartphone Charger

That black part isn't a phone, that's the battery and on the side is a Solar Cell. The WakaWaka will charge in sunlight in about 8 hours, or in about 4 hours when charge it using micro-USB input.

71-7UCaCJBL._SL1500_WakaWaka

Pros

  • Charges with Solar if needed
  • Extremely light, less than half a pound (200 grams!)
  • Flashlight with several brightness levels, good for camping
  • Small company, supports micro-finance and charitable giving

Cons

  • Only a 2200 mAh Lithium battery.
    • NOTE: Given that an iPhone 4/4s battery has 1420/1430 mAh battery this will give you about a single charge and a bit more. This device would be great with a 6000 mAh battery.

 

myCharge RFAM-0007 Portable Power Bank 6000

This simple and light charger charges with whatever micro-USB AC adapter you already have. It's claim to fame is the three built in cables for charging.

61N9tMfZVbL._SL1436_71cnXqNibzL._SL1500_[1]

Pros

  • Built in old-style iPhone cable. Built in mini- and micro-USB cable.
  • 6000 mAh, very light.

Cons

  • Built in cables are wonky. My iPhone one has failed and no longer charges. I can still charge via the one USB port.
  • In my experience it's power drops off FAST. Feels more like a 2500 mAh device.

Yell BPS66 6600mAh Dual USB Energy Bar

This weirdly shaped battery is a full 6600mAh and weighs only 180 grams (well under a half-pound.) It has a mini-USB in for charging and two USB ports for output. It comes with 8 little adapters, but I haven't used any of them. I just use what came with my phone. It will also charge a large iPad which is a great plus. Charges in about 9 hours.

81ExbDgkRNL._SL1500_201895144254

 

 

Pros

  • Very small and extremely powerful
  • Inexpensive given how much power it packs.

Cons

  • Still needs a mini-USB charger, preferably one that puts out 1A or more.

i.Sound Portable Power Max with 16,000 mAh

Ok, TO BE CLEAR, this thing is a BEAST. It weights 1.4 pounds, almost half what my Ultrabook laptop weighs, but - it puts out an obscene 2.4A if need be and can charge as many as 5 small phones at a time. It adds over 24 hours more usage to an iPad with a 16000mAh battery. This is a great overnight charger.

71n2sddoy-L._SL1500_814rHMTWcKL._SL1500_[1]

Pros

  • 16,000 mAh. There's nothing else that packs this much power. Charges an iPhone 10 times.
  • Up to 6 devices (if you use their splitter, otherwise 5)
  • Flashlight

Cons

  • Requires a proprietary AC charger - Don't lose it!
  • Heavy as heck.

PowerTrip 6000mAh with 50mA Solar Panel

This is a nice charger that plugs right into the wall. The solar panel is very small and will top it up a little in a day of full sunlight, although I've never been able to full the battery only on solar. It's the built in AC that sets it apart.

PowerTrip-with-iPhone-5powertrip2

Pros

  • Built in US AC plug. Just plug the whole charger into the wall. Big win.
  • 6000 mAh, 1.5A output.
  • Small solar panel built in.
  • Comes with three little 6 inch cables for mini, micro and Apple, useful.

Cons

  • Expensive and hard to find, about $100
  • Just one USB port

Related Posts

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Review: The Lenovo X1 Carbon Touch is my new laptop

April 27, '13 Comments [108] Posted in Hardware | Reviews
Sponsored By

 

I have a new primary laptop and it's the Lenovo X1 Carbon Touch. It's an Intel Core i7 3667U running at 2 GHz. I got 8 GB of RAM and a 240 GB SSD. The integrated graphics are the Intel HD Graphics 4000 running a 14 Inch screen. It also has Bluetooth 4.0 (nice!) as well as Intel a/b/g/n WiFi.

The X1 Carbon Touch is super thin

Feel

First, it feels pro. It feels like a Lenovo, and I've always been a fan. You either love them or not. I do. Since my first T60p they've never done me wrong, and this one is no different. If you like Lenovo, you'll like this machine. If you're a discriminating business user who wants power and portability, you'll appreciate this Ultrabook.

The Lenovo X1 Carbon Touch Keyboard

The keyboard initially looks weird and a little "chiclet-y" and I assumed it would be uncomfortable to use and very much unlike the Lenovo keyboards of legend. You're likely familiar with the classic look and feel of ThinkPad keyboards. Once you're competent on a ThinkPad keyboard you expect to be good on any of them.

While it's different, with its ever-so-slightly concave "smile" keys, they have the same travel and quality feel of any Lenovo. I have had no trouble getting used to the keyboard. I'd say now after some weeks I prefer this keyboard to the previous version.

Ultrabook Size and Weight

Stacked from thin to not: Lenovo X1 Carbon Touch, MacBook Pro, Lenovo W520

That's the X1 Carbon Touch on the top there, then a 2011 MacBook Pro, and finally a Lenovo W520 on the bottom.

The W520 is 1.5" thick and weighs 5.75 lbs with the 9 cell battery. While the 1080p screen was nice, carrying this beast all over the world DID tire me out. Add a few more pounds for an AC adapter that weight a pound itself, your phone and accessories, and you had a 10lb backpack pretty quickly.

The MacBook Pro weighs 5.6 lbs with a native 1400x900 screen. I tried using this as my primary for a few months and while the hardware build quality is top-notch, I found myself pawing at the screen unconsciously. More on this later, but once you really add touch as a complementary input option, you'd be surprised how often your brain assumes every machine has touch.

The X1 Carbon is super thin (slightly less than 3/4 of an inch), and light enough (just 3.4 lbs) to hold comfortably with one hand and faster than the W520. Sold. The major trade-off was 1600x900 resolution (rather than a full 1080p) and the lack of a third USB port, but its light weight is a daily joy. It's not quite half, but FEELS half as light as the W520 and MacBook Pro. It's only a 13.5" screen, but I have quickly adapted to it. Plus, I can run a large monitor (or they say, 3 with the USB Dock when it shows up) without trouble.

Out and About

Seriously, all laptops should be this thin and light. There's just no reason anymore for a 6 to 10 lb laptop and I said as much in my post "My next PC will be an Ultrabook."

I can truly see why MacBook Air folks are so enthusiastic. All Ultrabooks have an "Air" about them. When you can throw your 3lb Ultrabook in a Messenger Bag and it's no heavier than a few magazines, you're much more likely to carry it around. Add in 6(ish) hours of battery and you can comfortably move around before you have to plug in. Even better, somehow this thing charges FAST. Just 30 minutes of charging has topped me up 50-70%. I had a 20% low battery after a flight, plugged in while eating at the airport for a half hour, then ran to the next flight and I was more than 70% and able to work the next flight too. I'm getting >4 hours working hard, and have gotten as much as 6 with low brightness and just browsing or watching movies.

One of the USB ports will provide power to one device so you can charge your phone while the laptop is off. I love laptops with this feature. It saved me just last week while travelling. You can also charge the laptop with a phone connected so everyone gets charged.

The X1 also has a SIM slot for a 3G connection, although I've never met someone who used this. It worked fine with my AT&T 3G SIM but considering that I can tether from almost any device including my phone, plus the wide availability of sharing devices using 4G or LTE, this is a slot on this laptop you'll never fill.

Touch

Let's get real about touch a minute. Here's what I said before:

Don't knock a touchscreen until you've used one. Every laptop should (and will) have a touch screen in a year. Mark my words. This nonsense about how your arm will hurt assumes that you're only using it. A touchscreen is complementary not primary. I use it for pinching, for scrolling web pages, and for launching apps. It's much faster to just touch the icon than to mouse over to click one.

This X1 Carbon isn't a tablet, nor is it trying to be a tablet. It's a fantastic fast and light Ultrabook with a touch screen. Say what you will about Windows 8 and it's fullscreen interface, but I maintain that the addition of a touchscreen is as significant as the addition of a mouse. Similarly, when voice input is 100% reliable, adding voice will be equally as significant.

Three great input methods are better than two. I move from keyboard to mouse to touch smoothly.

Type type, mouse, swipe, type type, touch, click.

Sorting slides, moving files, swiping to the previous app, but most of all, scrolling around. Sometimes I use the two-finger scroll down gesture via the touchpad to scroll but often I hold my right hand around the screen and scroll down with my thumb. Often I'll pinch to zoom. It's extremely comfortable.

Reviewers and journalists need to understand that these computers aren't made for them. They are made for my kids and the touch generation. Touch screen MacBooks are inevitable. It will happen. Touchless is next after that.

If you do mobile device development, running these emulators with a touch laptop is a joy. Let me rephrase. Get a freaking touch screen, mobile developers. Touch on your laptop will make you happy every single day.

Learn to integrate touch into your existing keyboard and mousing style and you'll be faster and more effective than ever. If you use just one input method, you are missing out.

Dongles Galore

I also bought the requisite dongles including a Mini DisplayPort to VGA Adapter and Mini DisplayPort DVI. If you like wired network access, you'll also need the USB 2.0 Ethernet Adapter. Other than having to carry them around in my bag, dongle life is what it is. I'd rather have a slim laptop on a few adapters than continue to carry the Lenovo W520 I've been carrying.

I have ordered the Lenovo Think Pad USB 3.0 Docking Station but it hasn't arrived yet. I will update this review once it arrives. The docking station adds 5 USB 2.0 ports and an additional USB 3.0 port. It also includes Gigabit Ethernet.

This Docking Station also includes two (2) DVI ports which brings the number of monitors this laptop can run up to four. Well, three external (two DVI, one DisplayPort) and the built in LCD. It runs my 24" LCD over DVI today famously and without any trouble at all. I've also presented with this laptop using the VGA adapter and had exactly ZERO problems. The Display Drivers and adapters are rock solid.

Screen

There's been a lot of discussion about the screen on the X1 Carbon Touch. There's a protective film later over the screen and it really bothers some people. Some folks have successfully pried it off with some patience. Honestly, I noticed it for a day and then I stopped caring. I've spoken to folks who have said it was irritating enough that they sent the laptop back. Others just don't care. It's a clear, clean, bright screen and I'm happy with it.

X1 Carbon Touch Screen

X1 Carbon Touch Screen

It's not retina, but it's a great clear screen with great brightness and excellent horizontal viewing angles. It's a solid 14". I am surprised at the size of the W520 now that I've adapted to the X1.

Phrasing it differently, the X1 is a great mobile workstation. The W520 is a great workstation that can be moved occasionally.

The Good

It's really fast. I got the i7 processor version and it's fast. The 240gig SSD is lovely and devoid of hiccups. Visual Studio starts in 5 seconds cold, and 2 seconds warm. It runs Hyper-V nicely, and I've also run the x86 Android Emulator full speed as well as the Windows Phone emulator.

If you look at the WEI (Windows Experience Index) you'll be disappointed by the 5.5 Desktop Graphics performance, but I'm starting to think that this score should be thrown out. 2D graphics performance, while measureable, just isn't easily noticeable in day to day business use. We care about scrolling around in large documents, Excel, big PDFs, long web pages. The Intel integrated video in the X1 Carbon Touch is more than adequate. It's even pretty good in 3D games, handling games like TorchLight II very nicely if you turn antialiasing down just a smidge.

WEI for the Lenovo X1 Carbon Touch - 7.1, 7.4, 5.5, 6.4, 8.1

Tiny Happy Features

There some other nice features that are small but important that make this a great business machine.

  • A decent 720p HD integrated Webcam. I've used it with Skype and Lync and it works great. I wish it was angled slightly higher but that's a nit.
  • It has not only hardware volume buttons (which we expect) but also a hardware microphone mute button with an LED indicator which is great for long conference calls.
  • It boots up fast and sleeps very reliably. It reboots only when a Windows update requires it. I can close it and put it in my bag without concern.
  • A hardware Airplane Mode switch. This is not just a "turn off devices hard" button but it's integrated with Windows 8 and turns off all radios with a hardware switch. Also nice for saving batteries.
  • Good quality mics. I don't like doing conference calls or video conferencing with just a laptop's microphone but this one is better than usual.
  • Integrated TPM (Trusted Platform Module) so I can BitLocker my C: drive easily, and I have. I also get DirectAccess and a virtual Smart Card so I don't need to use VPN and am always logged into work. Super convenient.
  • Integrated Fingerprint login. I used to use this all the time on my W520 but for some reason I've been using the Virtual Smart Card lately. Still it's a nice login feature and I've had good experiences with it before.
  • One combination headphone/mic plug. Most good laptops have this now. You can use a good pair of headphones (or your iPhone headphones) and get mic and headphones in one. This detection is integfrated with the audio system.
  • Integrated SD card slot.
  • It's SO quiet. I sometimes wish it wasn't silent so I could know what it was doing.

And finally, one piece of software that came with it that I thought would suck but didn't - the Dolby Home Theater software. It actually has some nice presets for movies, VOIP, and music that definitely improve the output (or perception of output) of the speakers.

The Bad

The touchpad is the worse part of this device. Initially I hated it. They've removed the small textured touchpad I love from the W520 with it's buttons on the bottom, and replaced it with a new glossy glass touchpad. It's the lack of buttons on the bottom that's killing me. I keep bumping the touchpad while I'm using it and the cursor jumps.

It took me a few days to realize why this was happening, then I realized that I historically cursor with my index finger and rest my thumb on the bottom of the touchpad. With other ThinkPads there are buttons at the bottom that my thumb rested on. With the X1, I was resting on the touchpad itself. This just took a week of conscious thought and it's cool now, but be prepared for that "changeover" time as you teach yourself where to place your fingers while mousing. I'm interested in other X1 Carbon owners' thoughts on the touchpad in the comments.

The Carbon Touch has a much larger touchpad than the W520

I had to fiddle with the touch settings a little as well, as I move fast. I recommend power users turn down the duration you need to press and hold in order to activate a Right Click action. I also turn on the "Touch Feedback" so you can actually see the results of your touch. It's meant for presenters, but it's really nice to get the visual feedback that the system has recorded your touch.

Modify the Touch Settings to optimize your X1 Carbon Touch

The X1 Carbon Touch can also get a little hot. You'll only notice this if you are really a LAP-top person (and I'm not) but even now as I write this I'm running two instances of VS, PhotoShop and a Virtual Machine in Hyper-V doing Windows Update within a Windows 7 VM. It's not going to burn me, but it is definitely hot.

Finally, I did have one day with a really lousy Wi-Fi driver while I was travelling. The MGM Grand Hotel in Las Vegas had a wireless network that this Intel Wi-Fi card just hated. I was getting lockups and it was generally bad. However, I switched to using a 4G hotspot and updated the driver and never saw the issue again. Moral - Make sure you're using tested and reliable "out of the box" drivers. I am sticking with the drivers from Windows Update for important things and Lenovo System Update for non-essential drivers. I'm also finding the SD card (Ricoh) driver to be a little suspicious so I'm keeping it disabled in Device Manager when I'm not using it.

I recommend you uninstall ALL random software (there's not too much) that Lenovo puts on it except the Lenovo System Update. I use this for only for drivers and small utilities that give you things like on-screen caps lock notifiers.

The only other thing I really wish this laptop had was an extra USB port. There's one USB 3.0 and one USB 2 port and I really needed a third USB port recently while presenting. I used the USB to Ethernet adapter along with my USB Arc Touch Mouse and was stuck. I needed a third post for a the presenter remote. This is a small irritant, but I noticed it.

Conclusion

This is a very solid touch Ultrabook that I'm currently using as my main machine. The Lenovo X1 Carbon Touch has replaced my Intel Ultrabook which has been passed on to my wife. My Lenovo W520 is currently my emergency backup machine and is weighing down my bookshelf. I'm taking this device everywhere I go and when I'm not at home it's my primary development machine.


Sponsor: The Windows Azure Developer Challenge is on.  Complete 5 programming challenges for a chance at spot prizes, Stage prizes and the Grand Prize. Over $16,000 is up for grabs with 65 chances to win!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Many Raspberry Pi projects - How can you not love a tiny computer?

November 8, '12 Comments [23] Posted in Hardware | Open Source | Reviews
Sponsored By

Picade Raspberry Pi ArcadeHow can you not love a tiny computer? I posted about Top 10 Raspberry Pi Myths and Truths and since then I'm up to four Raspberry Pi devices. The most recent is the new Raspberry Pi "Model B" that includes 512 megs of RAM.

Sure, Raspberry Pis aren't fast, but what they lack in performance they make up for with chutzpah. They have a nice GPU as well which will decode 1080p MP4 video in hardware and play it just fine. Even better, for about $4 you can get a license to unlock MPEG-2 or VC-1 decoding in hardware.

I also have a Netduino and Netduino Plus as well as an Arduino that I use with the greatest FPS Controller in history, the SpaceTec SpaceOrb along with a custom OrbShield that provides a bridge between the RS-232 Serial Port and the Arduino.

All these devices are very reasonably priced and a great fun for kids or adults.  Next I'm looking at the PIX-6T4 "game console" that lets you write tiny games in C# on a Netduino Mini or perhaps a Netduino Go.

Don't listen to the folks who write negative headlines about the Raspberry Pi. Sure, it's the wild west but with a little patience you'll do fine. There's an amazing community around the Raspberry Pi.

The amount of excitement around these tiny machines is amazing. There's even a Kickstarter for a "Picade" tiny arcade cabinet.

To make things easier once you get your Pi, I do recommend the Adafruit Raspberry Pi Budget Pack if you don't want to go hunting for parts. This kit includes a great little clear case, a 4 gig SD Card (actually a mini with an adapter, which is great since the Netduino Plus has a mini SD slot), cables and power, but best of all, a breadboard, wires and a lovely little ribbon cable and "cobbler" that makes it super easy to keep things tidy while still messing with the Raspberry Pi's GPIO (General Purpose Input Output) connections.

Related posts you might like

LEGO Raspberry Pi CaseWhat's great about the Raspberry Pi and small devices like it isn't the price -although that's great - it's that the Raspberry Pi has a GPIO and HDMI. This means it's the easiest and cheapest little PC that can talk to the outside world's many hardware devices. Having the combination of  HDMI out (for your TV) and GPIO (for everything else) means it's extremely accessible to the beginner.

That GPIO port along with its ease of programming gives rise to such fun as as the RetroPie GPIO Adapter that let you hook up your old Super Nintendo (SNES) controllers to a Pi! You can order a RetroPie GPIO Adapter here. Here is Video of the RetroPie in action. I am not affiliated with this creative person at all, I just dig the idea.

So I've got four now. Some friends have tweeted me saying that they bought one Raspberry Pi and haven't gotten around to doing antyhing with it, usually because they aren't sure WHAT to use it for.

Here's what my Pi's are currently doing:

I'm sure there are more reasons to buy more Raspberry Pis. Here's a few.

Seventeen Awesome Raspberry Pi Projects

These are some exciting and fun projects for you to explore with Raspberry Pi that might make your Pi feel more useful and get you playing today!

Be sure to check out the Element 14 Community Site for Raspberry Pi. I also love AdaFruit and their Pi-related products like the Adafruit Pi Box (I have 2) or the Budget Pack (I have 1).

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Cloud-Controlled Remote Pan Tilt Zoom Camera API for a Logitech BCC950 Camera with Azure and SignalR

October 23, '12 Comments [33] Posted in Hardware | Lync | Open Source | Remote Work
Sponsored By

I like my giant blog post titles. Nyah.

Logitech BCC950 ConferenceCam, HD 1080p Video at 30 fps, 78deg. Field of View, USB 2.0 CompliantAs a remote worker for almost 5 years now, I live in video conferences. I feel really strongly about the power of seeing someone's face rather than just being a voice on a scratchy speaker phone. I've build an AutoAnswer Kiosk for Lync with some friends that you can get for free at http://lyncautoanswer.com (and read about the code here), I've got a BusyLight so the kids know I'm on a call, and the Holy Grail for the last few years has been a reliable Pan Tilt Zoom camera that I could control remotely.

Related Reading

A few years ago I super-glued a LifeCam camera to an Eagletron TrackerPod and build a web interface to it. I wanted to do this on the cheap as I can't afford (and my boss is into) a $1500 Panasonic IP Camera.

The Solution...er, the Problem

I have found my camera and built my solution. The Logitech BCC950 Conference Cam is the best balance between cost and quality and it's got Pan Tilt and (digital) Zoom functionality. The Zoom is less interesting to me than the motorized Pan Tilt.

Let's think about the constraints.

  • A Logitech BCC950 PTZ camera is installed on a Windows machine in my office in Seattle.
  • I'm anywhere. I'm usually in Portland but could be in a hotel.
    • I may or may not be VPN'ed into work. This means I want to be able to communicate with the camera across networks, traverse NATs and generally not worry about being able to connect.
  • I want to be able to control the camera in a number of ways, Web API, whatever, but ideally with cool buttons that are (or look) integrated with my corporate instant messaging system.

There's three interesting parts here, then.

  1. Can I even control the camera's PTZ functions programmatically?
  2. Can I relay messages across networks to the camera?
  3. Can I make a slick client interface easily?

Let's figure them out one at a time.

Can I even control the camera's PTZ functions programmatically?

I looked all over and googled my brains out trying to find an API to talk to the Logitech camera. I emailed the Logitech people and they folks me that the camera would respond to DirectShow APIs. This means I can control the camera without any drivers!

MSDN showed me PROPSETID_VIDCAP_CAMERACONTROL which has an enumeration that includes things like:

This lead me to this seven year old DirectShow .NET library that wraps the hardest parts of the DirectShow COM API. There's a little utility called GraphEdt.exe (GraphEdit) that you can get in the Windows SDK that lets you look at all the DirectShow-y things and devices and filters on your system.

GraphEdit

This utility let me control the camera's Zoom but Pan and Tilt were grayed out! Why?

GraphEdit showing Pan and Tilt grayed out

Turns out that this Logitech Camera supports only relative Pan and Tilt, not absolute. Whatever code that creates this Properties dialog was never updated to support a relative pan and tilt but the API supports it via KSPROPERTY_CAMERACONTROL_PAN_RELATIVE!

That means I can send a start message quickly followed by a stop message to pan. It's not super exact, but it should work.

Here's the C# code for my move() method. Note the scandalous Thread.Sleep call.

private void MoveInternal(KSProperties.CameraControlFeature axis, int value)
{
// Create and prepare data structures
var control = new KSProperties.KSPROPERTY_CAMERACONTROL_S();

IntPtr controlData = Marshal.AllocCoTaskMem(Marshal.SizeOf(control));
IntPtr instData = Marshal.AllocCoTaskMem(Marshal.SizeOf(control.Instance));

control.Instance.Value = value;

//TODO: Fix for Absolute
control.Instance.Flags = (int)CameraControlFlags.Relative;

Marshal.StructureToPtr(control, controlData, true);
Marshal.StructureToPtr(control.Instance, instData, true);
var hr2 = _ksPropertySet.Set(PROPSETID_VIDCAP_CAMERACONTROL, (int)axis,
instData, Marshal.SizeOf(control.Instance), controlData, Marshal.SizeOf(control));

//TODO: It's a DC motor, no better way?
Thread.Sleep(20);

control.Instance.Value = 0; //STOP!
control.Instance.Flags = (int)CameraControlFlags.Relative;

Marshal.StructureToPtr(control, controlData, true);
Marshal.StructureToPtr(control.Instance, instData, true);
var hr3 = _ksPropertySet.Set(PROPSETID_VIDCAP_CAMERACONTROL, (int)axis,
instData, Marshal.SizeOf(control.Instance), controlData, Marshal.SizeOf(control));

if (controlData != IntPtr.Zero) { Marshal.FreeCoTaskMem(controlData); }
if (instData != IntPtr.Zero) { Marshal.FreeCoTaskMem(instData); }
}

All the code for this PTZDevice wrapper is here. Once that library was working, creating a little console app to move the camera around with a keyboard was trivial.

var p = PTZDevice.GetDevice(ConfigurationManager.AppSettings["DeviceName"], PTZType.Relative);
while (true)
{
ConsoleKeyInfo info = Console.ReadKey();
if (info.Key == ConsoleKey.LeftArrow)
{
p.Move(-1, 0);
}
else if (info.Key == ConsoleKey.RightArrow)
{
p.Move(1, 0);
}
else if (info.Key == ConsoleKey.UpArrow)
{
p.Move(0, 1);
}
else if (info.Key == ConsoleKey.DownArrow)
{
p.Move(0, -1);
}
else if (info.Key == ConsoleKey.Home)
{
p.Zoom(1);
}
else if (info.Key == ConsoleKey.End)
{
p.Zoom(-1);
}
}

Also easy was a simple WebAPI. (I put the name of the camera to look for in a config file in both these cases.)

[HttpPost]
public void Move(int x, int y)
{
var p = PTZDevice.GetDevice(ConfigurationManager.AppSettings["DeviceName"], PTZType.Relative);
p.Move(x,y);
}

[HttpPost]
public void Zoom(int value)
{
var p = PTZDevice.GetDevice(ConfigurationManager.AppSettings["DeviceName"], PTZType.Relative);
p.Zoom(value);
}

At this point I've got the camera moving LOCALLY. Next, I mail it to Damian (my office buddy) in Seattle and he hooks it up to my office computer. But I need something to control it running on THAT machine...and talking to what?

Can I relay messages across networks to the camera?

Here's the architecture. Since I can't talk point to point via TCP between wherever I am and wherever the camera is, I need a relay. I could use a Service Bus Relay which would be great for something larger but I wanted to see if I could make something even simpler. I'd like to use HTTP since it's, well, it's HTTP.

A Diagram showing my laptop talksk via SignalR through Azure to the camera in Seattle

Since Azure lets me have 10 free websites and automatically supports SSL via a wildcard cert for sites at the *.azurewebsites.net domain, it was perfect for what I needed. I want to use SSL because it's the best way to guarantee that my traffic not be affected by corporate proxy servers.

There's three parts. Let's start in the middle. What's the Relay look like? I'm going to use SignalR because it will let me not only call methods easily and asynchronously but, more importantly, it will abstract away the connection details from me. I'm looking to relay messages over a psuedo-persistent connection. 

So what's the code look like for a complex relay system like this? ;)

using System;
using SignalR.Hubs;

namespace PTZSignalRRelay
{
public class RelayHub : Hub
{
public void Move(int x, int y, string groupName)
{
Clients[groupName].Move(x, y); //test
}

public void Zoom(int value, string groupName)
{
Clients[groupName].Zoom(value);
}

public void JoinRelay(string groupName)
{
Groups.Add(Context.ConnectionId, groupName);
}
}
}

Crazy, eh? That's it. Clients call JoinRelay with a name. The name is the name of the computer with the camera attached. (More on this later) This means that this single relay can handle effectively any number of clients. When a client calls to Relay with a message and group name, the relay then broadcasts to clients that have that group name.

Can I make a slick client interface easily?

I created a super basic WPF app that's just a transparent window with buttons. In fact, the background isn't white or black, it's transparent. It's a SolidColorBrush that is all but invisible. It's not totally transparent or I wouldn't be able to grab it with the mouse!

<SolidColorBrush x:Key="NotQuiteTransparent" Color="#01000000"></SolidColorBrush>

The buttons use the .NET SignalR library and call it like this.

HubConnection connection = null;
IHubProxy proxy = null;
string remoteGroup;
string url;

private void MainWindow_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.ChangedButton == MouseButton.Left)
this.DragMove();
}

private async void MoveClick(object sender, RoutedEventArgs e)
{
var ui = sender as Control;
Point p = Point.Parse(ui.Tag.ToString());
await proxy.Invoke("Move", p.X, p.Y, remoteGroup);
}

private async void ZoomClick(object sender, RoutedEventArgs e)
{
var ui = sender as Control;
int z = int.Parse(ui.Tag.ToString());
await proxy.Invoke("Zoom", z, remoteGroup);
}

private async void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
url = ConfigurationManager.AppSettings["relayServerUrl"];
remoteGroup = ConfigurationManager.AppSettings["remoteGroup"];
connection = new HubConnection(url);
proxy = connection.CreateProxy("RelayHub");
await connection.Start();
await proxy.Invoke("JoinRelay", remoteGroup);
}

The client app just needs to know the name of the computer with the camera it wants to control. That's the "GroupName" or in this case, from the client side, the "RemoteGroup." Then it knows the Relay Server URL, like https://foofooserver.azurewebsites.net. The .NET client uses async and await to make the calls non-blocking so the UI remains responsive.

Here's a bunch of traffic going through the Relay while I was testing it this afternoon, as seen by the Azure Dashboard.

Traffic as shown in a graph on the Azure Dashboard

The client calls the Relay and the Relay broadcasts to connected clients. The Remote Camera Listener responds to the calls. We get the machine name, join the relay and setup two methods that will respond to Move and Zoom.

The only hard thing we ran into (Thanks David Fowler!) was that the calls to the DirectShow API actually have to be on a UI thread rather than a background thread, so we have to get the current SynchronizationContext and post our messages with it. This results in a little indirection but it's not too hard to read. Note the comments.

private async void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
var deviceName = ConfigurationManager.AppSettings["DeviceName"];
device = PTZDevice.GetDevice(deviceName, PTZType.Relative);

url = ConfigurationManager.AppSettings["relayServerUrl"];
remoteGroup = Environment.MachineName; //They have to hardcode the group, but for us it's our machine name
connection = new HubConnection(url);
proxy = connection.CreateProxy("RelayHub");

//Can't do this here because DirectShow has to be on the UI thread!
// This would cause an obscure COM casting error with no clue what's up. So, um, ya.
//proxy.On<int, int>("Move",(x,y) => device.Move(x, y));
//proxy.On<int>("Zoom", (z) => device.Zoom(z));

magic = SynchronizationContext.Current;

proxy.On<int, int>("Move", (x, y) => {
//Toss this over the fence from this background thread to the UI thread
magic.Post((_) => {
Log(String.Format("Move({0},{1})", x,y));
device.Move(x, y);
}, null);
});

proxy.On<int>("Zoom", (z) => {
magic.Post((_) =>
{
Log(String.Format("Zoom({0})", z));
device.Zoom(z);
}, null);
});

try {
await connection.Start();
Log("After connection.Start()");
await proxy.Invoke("JoinRelay", remoteGroup);
Log("After JoinRelay");
}
catch (Exception pants) {
var foo = (WebException)pants.GetBaseException();
StreamReader r = new StreamReader(foo.Response.GetResponseStream());
string yousuck = r.ReadToEnd();
Log(yousuck);
throw;
}
}

It All Works Together

Now I've got all the parts. Buttons that call a Relay that then call back - through NAT and networks - to the Remote Camera Listener which uses the Camera library to move it.

It's ALIVE and it's awesome

It works like a champ. And, because the buttons are transparent, I can put them over the Lync window and pretend it's all integrated.

TODO: I'm hoping that someone who knows more about Windows Internals will volunteer to create some code that will automatically move the buttons as the Lync Window moves and position them over the video window in the corner. Ahem.

The buttons look integrated. But they aren't.The buttons look integrated. But they aren't.

You can set this up yourself, but I haven't gotten around to making an install or anything. If you have a Logitech BCC950 you are welcome to use my Relay until it costs me something. There's a preliminary download up here so you'd only need the Listener on one side and the Buttons on the other. No drivers are needed since we're using DirectShow itself.

This was great fun, and more importantly, I use this PanTiltZoom System ever day and it makes my life better. The best was that I was able to do the whole thing in C#. From client UI to cloud-based relay to device control to COM wrapper, it was all C#. It makes me feel very empowered as a .NET developer to be able to make systems like this with a minimal amount of code.

Lync Developer Resources

Related Links


Sponsor: Big thanks to this week's sponsor. Check them out, it's a great program, I've done it and spoken to actual live humans who help you get started writing an app! Begin your 30-day journey to creating a Windows Store app or game for Windows 8 or Windows Phone today. Your Idea. Your App. 30 Days.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web

Initial Impressions of the 3rd Generation Ivy Bridge Intel Ultrabook Reference Hardware for Developers on Windows 8

September 5, '12 Comments [29] Posted in Hardware | Reviews | Win8
Sponsored By

Some of the software folks at Intel sent me an Ivy Bridge Ultrabook to look at. It will never be production hardware - this laptop will never be made or sold. That doesn't mean it's exclusive or special or extra fancy, instead, it's meant to be a reference example for hardware makers to make Ultrabooks of their own.

I did an unboxing and initial impressions video which I've embedded here.

Now that I've been using this Ultrabook for a while, these are my updated impressions. I've separated them into categories to make sure that we all keep things straight.

  • Hardware - This isn't a production Ultrabook. In fact, as a piece of hardware it's got problems, which I will go over. However, since Intel doesn't actual MAKE laptops, you should take all those observations with a huge grain of salt. Rather than taking my criticisms as impugning this specific laptop (that will never exist) they should instead be a warning to other Ultrabook makers. If you're going to make a tiny laptop to compete with a MacBook Air  - or surpass it - you better get the details right.
  • Software - The Ultrabook came with Windows 8 Release Preview which I promptly torched and installed the release of Windows 8. It's my personal expectation that an Ultrabook not just be a good Windows laptop, it should "just work" with Windows 8 and do all the things we expect any laptop do, like be fast, boot quickly, sleep quickly and not crash.
  • Sensors and Auxiliary Hardware - Why is sensors its own section? Because its these invisible sensors that will change how we think of laptops in the coming year. Sure they all have keyboards and screens but soon every laptop will have touchscreens and accelerometer and gyroscopes and location sensors.
  • Development and Speed - Any $399 Walmart Laptop can run Word and your blog. I am not interested in reviewing those products for those activities. I want to know if I can replace my 10 pound BEAST of a laptop - my beloved Lenovo W520 - with a 3 pound Ultrabook. Can a slim laptop run Hyper-V VMs and multiple instance of Visual Studio while running multiple monitors?

That is the underlying question that should pervade this review. Can a 3 point laptop replace a 6 to 10 pound guaranteed powerhouse desktop replacement and be my new "on the road laptop."

Hardware Impressions

Again, this isn't hardware that will ever be released, it's just a reference. And frankly, that's a good thing. It's not very good. This prototype "Intel branded" Ultrabook has a lousy keyboard and a mediocre touchpad that is a pain to use. Literally my fingertips hurt from these keys. The keys are made out of the same hard plastic that the case is made from and they have a hard clicky travel that is consistently irritating to the point of numbness. I realize I am coming from a Lenovo - the recognized king of keyboards - but this is just painful. Still, Intel is a chip company so I won't belabor the point for a non-existent product. In this case it's a good thing they aren't making laptops because this keyboard would be a deal breaker.

The only thing worse than the keyboard is the touchpad. It's an ALPS brand touchpad which means it has a kind of multi-touch. Initially this Ultrabook came with older drivers and two-finger scrolling wasn't enabled. This 24 hour period without easy scrolling was a nightmare. It's not surprising how quickly two-finger scrolling has become the expected standard with touchpads. Once you've baked it into your brain it's required equipment to the point that I truly would not purchase any laptop or Ultrabook without a two finger scroll.

Stacking the Ultrabook next to a MacBook Pro and Lenovo W520 to compare thickness.

I almost wrote this laptop off until I got all the latest drivers installed. The ALPS touchpad now includes new drivers for not only two finger scrolling (yay!) but also something called "Edge Action" that essentially takes the edge-based touchscreen gestures from Windows 8 tablets and assigns it to the touchpad. Swipe in from the right to get the charms menu, in from the left to task switch and down from the top for menus and browser tabs. This is such a clean and clear extension of the "touch" experience that if I were in charge of the Windows hardware ecosystem I would require it. Pinch to zoom works as well, just as it should. Kudos to the ALPS driver guys. Your friends at Synaptics (the makers of the Lenovo Trackpad) had better take notice. Multitouch isn't just for screens, and I will no longer buy a laptop without a multi--touch touchpad and neither should you.

From my perspective saying something is an Ultrabook is more than just saying "we can be a MacBook Air too," it's having a cohesive and completely self-consistent hardware and software mix where everything just works as it should and works seamlessly. Day one without the right drivers was a tiresome exercise that had me ready to give up. Day two of mousing was a smooth and happy experience that rivaled or surpassed the MacBook Air and the only difference was touchpad drivers. I hope that these drivers are "in the box."

TouchScreen

A touchscreen on a laptop? Why? What kind of madness is this? After using it for a while having a touchscreen is a nice to have. The mistake reviewers make is thinking that we the users are expected to be swiping around all day with tired gorilla arms. The real truth is that it's just a third input device. Keyboard, mouse, screen. Now everything can be touched - and preferably ordered like this by frequency of use, at least for a laptop.

I find myself reaching for the screen a few times an hour. Not enough to get tired and not enough to pretend I am on a tablet, but enough to appreciate it. Sometimes clicking Start and touching a large icon is just faster than the mouse and more relaxed than the keyboard. After a while I even used the taskbar buttons by touch to open apps as those buttons are just a few inches from the top row of function keys.

I often used the touch screen to position the cursor when editing large amounts of text. When browsing long form reading on Instapaper I would scroll with the screen, usually resting my hand in the lower right corner of the screen and scrolling with my thumb. It's a very natural position.

This reference hardware includes 5 touch points and built-in apps like Maps worked great. It did tend to miss some taps though, usually just one finger doing basic stuff. I'm assuming this is a hardware driver issue, perhaps trying to prevent unwanted taps. It was noticeable enough to be irritating so I'd recommend to anyone purchasing an Ultrabook with a touch screen to spend some time with the hardware and ensure it's consistent and reliable.

Software

Let's get back to drivers. There's two kinds of drivers in the Windows World. There's what they call "inbox" drivers and there's 3rd party drivers you install later. I am a big fan of inbox drivers, myself. These mean that your computer and all it's bits and pieces will "just work" out of the box when you turn it on, even if you've just installed Windows. These drivers are super-tested and are super-stable. They may not give you all the most advanced features but they will "Just Work." If you want to get the 3rd party stuff you can install those.

Everything on this laptop worked pretty well out of the box. In my experience computers started working pretty well out of the box without hunting for drivers around the time Windows 7 came out. I am hoping that this patterns continues with Windows 8. The drivers I've been installing on this pre-release laptop have been pretty rough and very crashy so I've reverted back to the stability of the "inbox drivers" but just uninstalling the add-on ones. I assume by the time Ultrabooks in this generation come out that all the kinks will be worked out.

Sensors and Auxiliary Hardware

Sensors are getting cheap enough to include and integrated directly into Windows 8 to the point where we'll just assume that every laptop has a compass and the like. Window 8 actually formalizes a whole Sensor Platform which makes developing to them a lot easier than before and doesn't require the application developer (you and me) to think about 3rd party drivers. We just call standard APIs. The Windows Driver Kit (WDK) includes Sensor Diagnostic Tools we can use to explore our hardware's capabilities.

For example, Ultrabooks can have any or all of these sensors:

  1. GPS (recommended): Every machine should have this now since most browsers and all map applications can use it.
  2. Accelerometer (recommended): If you have a spinning hard drive the machine could shut it off if if feels it's being dropped. It's more likely that this sensor could be useful for speed and mapping.
  3. Ambient Light Sensor (ALS) (recommended): This reference Ultrabook automatically changes the brightness of the screen based on ambient lights.
  4. Compass: Again, useful for mapping.
  5. Gyroscope: Ultrabooks that have foldable screens that rotate and bend backwards will automatically adjust screen orientation for you.

This Ultrabook also has NFC (Near Field Communication) as well as Bluetooth 4.0.

Here's a screenshot of the Sensor Diagnostic Tool that comes with the WDK talking to this Ivy Bridge Ultrabook's sensors:

Windows Sensor Diagnostic Tool

I will likely poke around with these sensors from .NET and see what useful data I can get with them.

Development and Speed

As you can see half-way through the unboxing video this little Ultrabook is FAST. It can load Visual Studio 2012 in about 2 to 3 seconds and builds of average-sized projects are also just seconds.

PERFORMANCE UPDATE: I recently used this Ultrabook to turn 15gigs of video into a 10 minute 1080p memorial video for my Uncle. I had no trouble at all editing and rendering the video and was pretty pleased that was able to do it with a 3lb laptop and not my desktop machine.

While the 3D graphics speed isn't where I'd like to see it, there's a WEI of 8.1 on the hard disk and and 7.2 on the processor. Remember that WEI's are kind of like the Richter Scale. Changing a whole number is a big deal and the difference between a "7 class" and "8 class" device is not only measureable but significant.

The 8.1 WEI is for the 160gig Intel SSD in this Ultrabook and it's super fast. Visual Studio 2012 is very hard on disks and disk access and this Ultrabook is taking it like a champ. That combined with the quad (UPDATE: It's a physical Dual Core with Hyperthreading so that's 4 logical processors) processor i7 at 2.49GHz means that while there is that (as of yet) unavoidable i7 fan when it's working hard, this machine can cook.

Intel i7-3667U Ivy Bridge

Conclusion

I could develop on an Ultrabook. I could. I didn't think I could. It pains me to say it as I have been carrying around 10lb laptops in the name of power for over a decade. I have always said that I would carry that extra few pounds with me for 20% more power because, hey, all laptops weigh the same when they are sitting on your desktop. However, if you can get me a quad i7 in 3lbs, then we can talk. We are SO close.

The Bad or Weird

My major complaints about this Ultrabook from a developer - or even a power user - perspective are:

  • 4 gigs of RAM? Come on, son. It's 2012, just make it 8 gigs and let's move  on.
  • The fan. Yes, I admit it, I want a quad-core Intel processor in an iPad and I want it silent and cool as iced tea. Sue me.
  • The keyboard. This is likely an unfair beef as this Ultrabook will never be made, but just a reminder to us all. The thing you touch on the laptop is the most important. Get the keyboard right.
  • Just 2 USB Ports. I would have appreciated a third USB port, and a smart card slot.

The Good

  • It's small. 3 pounds is small. It's flat and it's easy to throw in a bag. I may give it a try and do an international trip with ONLY this Ultrabook. That is no small risk for me to take, especially as I need my machines to present.
  • It's fast. Compared to my wife's 3 year old Dell of similar (albeit swollen) size, this thing moves along at the speed of thought.
  • It works. It's like an appliance. It turns on in seconds, shuts off when you close the lid and is reliable. I trust it more than my other laptops.
  • You can touch it. The touchscreen is nice to use when you lean forward and scroll, or reach up to navigate, or just browse. It's not fundamental but touch DOES change the relationship with your laptop.

I'll use it full time as a developer some more and report back, especially if I go on a trip with it.

Disclosure of Material Connection: Intel sent me this Ultrabook for free in the hope that I would review it on my blog. Regardless, I only recommend products or services I I would use and think you would find useful. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by ORCS Web
Page 1 of 4 in the Hardware category Next Page

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.