Tuesday, December 24, 2013

Love my Moto X

What I love about my new Moto X:


  • dynamic notifications - Dynamic notification is a feature that causes notifications like email and chat receptions to show up on the sleep screen. (On other phones, it might light an LED or something.) It's handy knowing what the notification is without having to wake up the phone, and it doesn't appear to hurt battery life at all. My favorite part, however, is being able to wake up the phone without pressing the tiny power button.
  • trusted devices - A trusted device is any of your Bluetooth devices - car, Pebble watch, etc. - that you have told the phone you trust. While the phone is nearby to it, you don't have to unlock the phone to wake it up. The idea is, if someone steals the phone and it goes out of range of any trusted devices, the phone will lock.
  • better battery life - The phone can go 3 days without charging, vs 2 days for my last phone.
  • loud, clear speaker

What I dislike:

  • no more native SIP - the native SIP client is gone, (I blame Kitkat), have to install my own :(


The messaging app explosion

I've never been a big Twitter-er, mostly because of the lack of privacy, I guess. Or texter, mostly because of the cost. But recently things have happened which made me take note of a bunch of recently new apps.

A bunch of friends started sending me things through Apple's iPhone's iMessage app. It's weird in that, you can select a bunch of people from your contacts and, if they don't have an iMessage account, it will MMS (?) or email them.

This doesn't work well because it doesn't tell me who belongs to each phone number (do you know all your friends' phone numbers?) and replying didn't work either, through email or SMS'ing by hand.

I also noticed that my daughters were doing the same thing. That is, they were group texting. Fortunately, we now have unlimited text messaging so I won't get sticker shock with the monthly bill.

But it made me wonder, isn't there something out there better for group chat? Is SMS really the lowest common denominator? The lingua franca? Yes, I know that SMS isn't that bad, that it's all the third world countries have and that even many people in the US are limited to what their clamshells can send and receive. But surely there is something between iMessage and SMS ???

It turns out that there's something better, but "no one" uses it. XMPP aka Jabber is what both Google Chat and Facebook chat use. It supports group chats and presence notification. "Presence" is where it tells your friends whether you're "away" or not.

The trouble is that, while XMPP is supposed to be "federated", that is, Google and Facebook users are supposed to be able to talk to each other, instead, both Google and Facebook have shut their doors to the other guys. I guess it turned out that they couldn't monetize an open chat protocol so they closed the gates to each other to create their own little "walled gardens".

Broadening our search further, we find more and more "walled gardens". The most popular chat applications out there, by subscriber base, are:

from here: http://www.digitaltrends.com/mobile/best-chat-messaging-apps/

Skype - 300 million
iMessage - 250 million
Facebook - >200 million
Viber - >200 million
WhatsApp - <200 million, $1/yr
Google Hangouts - <100 million

With the exception of Skype (and possibly Hangouts at this time), the others will down convert to SMS if necessary. One of the amazing things I notice is that WhatsApp got so many users despite charging for the service and despite not having an existing user base. While the others don't send ads yet, I guess the threat of sending them, or WhatsApp's features, were enough to get them users without having the gargantuan block of users that, for example, Apple and Facebook have. Hats off to WhatsApp and Viber for being able to compete in the same room as the big guys.

But here's my question: Why is SMS the lowest common denominator? When I receive an SMS, it doesn't say who it's from and it's a pain to reply to a group SMS. Some services like GroupMe create "conference rooms" for you to text in, but this is a hack over a primitive service that is, what? 20 years old?

Additionally, having SMS as a back-up hasn't prevented the fractured market that we have. That is, no one is emerging as the leader. If anything, the field is expanding as chat apps pop-up with unique features like splitting a dining bill or erasing a photo as soon as it's viewed.

Couldn't we go back to supporting XMPP? Then we could see who sent a chat message, we'd have presence notifications, we could send large messages and could do group chat without resorting to MMS.

Hey, big guys, what would be the harm? Is SMS supposed to be painful so that we'll all create an account on your service that we don't want to have anything to do with?

Thursday, December 12, 2013

Teen steals alcohol and kills 4 people. "Oopsie". Exonerated.

The best defense attorneys money can buy. They claim parents taught him that there are no consequences for rich people.

I would say the judge taught him that.

http://gawker.com/teen-who-killed-four-people-got-off-on-probation-becaus-1480835092

Sunday, December 8, 2013

Where are the flip phone app stores?

My daughter's slide-out keyboard phone died and, instead of getting another one right before Santa might bring one, we got a cheap flip phone for her so she could reach us in the meantime. We got a Samsung T139. Only $20.

The first thing that struck me about it (reminded me, more like, since we used to all have flip phones) was that it was so tiny and light. It's only 2.96 oz versus 4.9 for a typical smart phone. Also, it fits into a pocket trivially, and doesn't stick out (and slide out, sometimes) like a smart phone "tablet". The battery lasts 12 days. That's "days", not "hours".

I wonder why we left such phones, and so quickly. To surf the web and read email? Perhaps but those are not easy to do on a phone, especially writing. I'm certain there was a "coolness" factor involved. We can probably lay some blame on "Angry Birds".

[ In all honesty, map apps are a crucial use for smart phones. The built-in GPS, big screen, strong CPU and data connection make a fairly killer combination. ]

One thing that smart phones let us do is write our own apps. Smart phones are general purpose computers so one can put all kinds of little apps onto them, some that even make sense to put onto a phone. A pedometer, for instance, makes perfect sense to put into a small device that you always carry with you. It doesn't require an extensive user interface. It doesn't even need to upload the data anywhere, but it could.

I've heard that flip phones are making a come back as people migrate their heavy viewing to tablets. I wonder if this would only accelerate if flip phones had "app stores". For instance, one tiny app that I like to have is the OTP generator for my email account. I ported it to my Pebble watch; why can't I put anything on a flip phone? *Does* anyone make an open flip phone? Could we convince Samsung to open theirs?

It vaguely appears that these phones can run Java applets. I don't know if the applets have to come from webpages, or if they can also be loaded locally. There may be hope there; Android uses Java almost exclusively.

A killer feature for flip phones would be the ability to run SIP (either over wifi or cellular data). SIP users tend to be fairly frugal. What's better than a cheap phone on a cheap phone network?

Wednesday, December 4, 2013

BMW likes me!

BMW knows that I like notebooks!


It's full of graph paper with occasional BMW drawings:


The only problem is: Where's the fountain pen that I'm supposed to use? :( I guess they don't know me that well.

Wednesday, November 20, 2013

On the Distribution of Wealth

I've seen variations of this demonstration before:

http://www.youtube.com/watch?v=QPKKQnijnsM

but I don't think it goes to the heart of the issue. If you ask people how to fix it, they have no clue. They don't realize that the wealth accumulates over a lifetime. By the time someone dies, they've grossed MUCH more than the tax man will take away.

At a growth rate of 5%, it takes 14.4 years (72 / 5) to double your money. Over an 80 year span, you should be able to double your money 5.5 times - a multiplier of 47 times!

Here's the current law (if I'm reading wikipedia correctly): The first $5 million given at time of death is estate tax free. Everything after that is taxed at 40%.

That's right: If you have 2 kids and give them $5 million each, the tax man doesn't get a penny and your kids will never have to work a day in their lives.

The child of the guy who multiplied his money 47 times will only pay 40%. That's still a multiplier of 28!

So how do we fix this? How do you let the farmer bequeath his $10 million farm but prevent the Walton family from owning the world? How much SHOULD the Steinbrenner children have paid on their $1 billion inheritance?

The trouble is, every time you talk about raising the inheritance tax, even poor people freak out. I can't figure this out. It's like they're suddenly going to jump from middle class to having billions and they're poor children are going to have to, God forbid, give some of it back.

So how about this? How about we have a HUGE exemption - like $100 million - and a "huge" tax rate for money over that - like 80%? Mr. Multiplier STILL has a 9.4x multiplier.

Until people see this fact - that estate taxes are paid for a lifetime's gain - we will never have a "fair" rate and the rich will keep getting richer.

Tuesday, November 19, 2013

Google Voice and ALEC

My interest is mostly because this is in the wake of Facebook, Google and Yelp joining ALEC (back in August.)

(less than 4 minutes)
http://www.npr.org/blogs/alltechconsidered/2013/11/18/246001725/have-we-reached-the-end-of-the-landline

Monday, November 18, 2013

.asoundrc for Chrome and Hangouts with separate microphone

The default settings for a computer with a single sound device - the built-in chipset - tend to work pretty well for videoconferencing. Even though the camera may have a microphone, the system tends to like getting audio from the same place it sends it to, the default sound device. Both ALSA and PulseAudio will do this out of the box.

But what if you wanted to use the camera's microphone? If you use PulseAudio, you simply have to select that device in the Input tab of Sound Setting.

But what if you didn't want to use PulseAudio? What if you like a simple system with a minimal of latency? Then you would want to use ALSA directly.

The trouble is, Chrome tries to re-open the sound devices when it runs a Hangout. If you use PulseAudio or JACK, you will see Chrome open the sound device 2-3 times at once. Unfortunately, ALSA can't handle multiple processes opening a sound device all at once. ALSA will block the second and later users. If you only use ALSA, Chrome audio will then block as it tries opening a device that it already has open.

The way to solve this is to simply not use the default ALSA config file. If you make your own, you can use a device called "dmix" that will allow multiple sound producers to simultaneously open a device.

Additionally, we want to change the default microphone from the built-in one to a USB device, perhaps the camera perched atop your monitor.

For the benefit of the following discussion, here are my devices, as reported by a "arecord -l":

**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC262 Analog [ALC262 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC262 Analog [ALC262 Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 2: AK5370 [AK5370], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 3: U0x46d0x821 [USB Device 0x46d:0x821], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

In my .asoundrc file, we're going to use the AK5370 device (even though the U0x46d0x821 is the USB camera. Feel free to switch it.)

Here's the .asoundrc file:

# Here we define the default sound device, the built-in Intel chipset,
# which we'll use for output.
pcm.PCH {
        type hw
        card PCH
}

# Here we define the device that will allow multiple processes - Chrome,
# vlc, etc. - to open the device at the same time. The secret is the "dmix"
# device.
pcm.multiPCH {
        # Chrome needs to open this multiple times.
        type dmix
        ipc_key 1024 # must be unique!
        slave {
                # Never use numbers ie. hw:0
                # Linux re-numbers them, depending on how it boots,
                # or how you plug them in.
                pcm PCH   # you cannot use a "plug" device here, darn.
                period_time 0
                period_size 1024 # must be power of 2
                buffer_size 4096 # ditto
                rate 48000
        }
}

# Here we define the raw microphone. By the way, it only supports
# 32kbs. ALSA does the conversion.
pcm.logitech32k {
        type hw
        # Never use numbers ie. hw:0
        # Linux re-numbers them.
        card AK5370
#       rate 32000
}

# Here's the last part, to put the output and input devices above together.
# A built-in sound chip doesn't need to be told that the output and input
# go together. But when you pull together 2 random devices, you need to tell
# ALSA how to put them together.
#
# We do this with the "asym" device, as in "asymmetric."
pcm.chrome {
        type asym
        playback.pcm "multiPCH"
        capture.pcm "logitech32k"
}

# This just defines the default device, which is our "asym" device above.
# Make a direct alias, no intermediate "plug" pcm
pcm.!default pcm.chrome

Tuesday, August 20, 2013

sparkfun is down

Sparkfun's IT administrator laments about MySQL while site is down. Copied here because it'll be gone tomorrow.

tl;dr: SparkFun's down for a while this evening, starting at 18:30pm MDT, while we work on some database stuff. We should get better at uptime, but right now we're mostly trying to get better at databases. Related web nerd musings below the llama, for those interested.

So tonight, sparkfun.com's going to be down for a while. We're hoping for no more than an hour or two, although it could very well run longer.
This is where I concede that we could really get better at keeping the site up all the time than we are right now. We're working on that bit, but right now what I want to ramble about instead is databases.
Since approximately the dawn of time (which is to say since some time last decade, before I worked here), SparkFun has run the core of its business on MySQL (and recently MariaDB). When I got hired in the fall of 2007, a lot of the important code was still split between a hacked-uposCommerce installation and a pile of MS Access clients. That stuff has been gone for years now, but the database itself persists. In places it's practically a fossil record of offhand design decisions made by other people writing a shopping cart some time in 2003.
This probably happens everywhere. Application code may change drastically, but in a working shop, the data store has a way of becoming the scaffolding around which (for better or worse) everything is built and must be maintained.
As it happens, when we first realized that we needed a better toolset than not-very-object-oriented old-school PHP, we made some decisions with long-term consequences:
  • We decided to keep using PHP instead of rewriting everything in Ruby.
  • We decided to write our own lightweight web application framework instead of using existing PHP projects.
  • We decided to write our own ORM layer instead of using existing libraries.
A lot of things informed those decisions: We didn't want to have to replace all the working software at once just to use better tooling for new code. Everyone on our team already knew PHP. The frameworks we looked at seemed lacking in comparison to the stuff we'd used in languages like Ruby and Perl. The available PHP ORM libraries were either heavier than we wanted or built on assumptions that didn't fit our existing (frequently terrible) schema. Finally, rolling our own sounded kind of interesting, and we had no idea what we were getting ourselves into.
(Ok, so in the interest of full disclosure, what happened is that I talked louder than people who knew what we were getting ourselves into.)
Fast-forward a couple of years during which we hire more programmers and SparkFun gets another half million orders. We're sitting around in the mountains drinking beer and talking about what we really should get better at and the subject of PostgreSQL comes up.
See, MySQL and its forks, for all of the really huge and amazing stuff built on them in the last decade, have got some drawbacks. On this point, I risk triggering a lot of strong feelings from the sort of people who have strong feelings about databases, so for the time being, let's just say that it started to seem like we'd have a better time writing business software on a database that embodied a more rigorous approach to formal types and relationships. And because of years of our nerd friends telling us we should probably just use PostgreSQL, it kind of seemed like PostgreSQL might be that database, especially since we already knew we were going to use something with open code.
So we had some more beers and we talked about it and we had some more beers and we talked about it some more, and maybe six months later we finally decided to go for it.
So that's what we're doing.
Sort of.
It turns out that, when you write your own ad hoc ORM layer against a piece of software like MySQL without the faintest idea of how far you're about to be in over your head, it's pretty easy to make a bunch of assumptions without even noticing them. Rumsfeldian unknown-unknowns, if you will, creep in at every turn. Like fish and the concept of water, people who work with a given data store for a long time begin to forget that certain abstractions are even objects of possible consideration. These bits of data are represented as strings in PHP? Well, that's natural, right? What else would they be? String comparisons in your database of choice are all case-insensitive? Well, heck, that's almost a feature, right?
So then you decide you're going to point things at a different database and you get a crash course in all of the stuff you were wrong about, and all of the things you made impossible to test, and all of the ways your implicit assumptions about the two or three or five different type systems you rely on across languages and representations of your model are actually pretty fractured and subtly wrong.
So what we're doing tonight is rearranging a bunch of MySQL schema and deploying a terrifyingly long list of code changes that get us about three quarters of the way to being able to actually migrate to PostgreSQL without all of our software exploding continuously. We sincerely hope. (As regards exploding software, I also have a lot of recently developed thoughts about how I'll never again write a large project in a dynamic language without just tons and tons of unit tests.)
I should really write something coherent about all of this, but I just realized we actually need to deploy the code and such now.
Anyway, thanks for bearing with us while the site's down. The colored wires and blinkenlights and such will be for sale again soon.
☮,
— Brennen / SparkFun IT



postscript: This is the best sloth, right?
Sloth Gif. the wise sloth knows all.

Sunday, August 18, 2013

The State of Mobile VOIP: Redphone

A couple years ago, Whisper Systems released a product called Redphone that is quite intriguing. Redphone is both an app for Android and iPhone, as well as a service (like Skype). The easiest way to describe Redphone is that it's SIP with a fixed configuration, ZRTP and TURN. That is:

  • all the parameters are set by the system making configuration trouble-free
  • all the calls are encrypted with ZRTP
  • while SIP is usually peer-to-peer, Redphone calls go through Redphone's servers.

You register with Redphone using your phone's number. (It also works with Google Voice.) Redphone verifies it with a text message that it automatically responds to.

When you call, you specify another phone number. You can use the stock dialler and, if the other person is registered, it will use that instead. Redphone "rings" this device using either an SMS message, or a Google or Apple push notification, whichever the receiver prefers.

NOTE: In my experience, Google push notifications don't appear to work (or at least not be reliable) over a NAT'd local network (most wifi). If you aren't receiving calls, try switching to "always use SMS".

If the call is accepted, the two phones begin an elaborate protocol to both encrypt the conversation and make sure that no one has intercepted the call in between the two phones.

After a call has begun, Redphone will display two words on the phone's screens. You read one word; the other party reads the other word. If the pair matches what the phones show on the screens, then you can be reasonably sure that no one is in between you two, relaying the call's data.

ZRTP specifies that, once you have called someone, you shouldn't have to go through the "compare words" protocol again, however rumor has it that Redphone doesn't store this information. I can't say I mind, since it seems (to me) like the best place to attack the protocol, and the word pair protocol is quite unobtrusive.

Redphone is fairly hassle-free. ZRTP doesn't require previously trading public keys with anyone. The security relies on you recognizing the voice at the other end, and the word pair. Calling someone is as simple as selecting them out of your contact list. If you or your communicado's are tech-newbs, but you want security, this is the app to use.

Redphone was written by Moxie Marlinspike, a name well known in the security business, and Stuart Anderson. Redphone was acquired in 2011 by Twitter, who seems to be trying to make a name for itself among Middle Eastern protesters. However, the service can and has gone away before. Have a back-up.

Monday, August 5, 2013

The State of Mobile VOIP: Republic Wireless

A company called Republic Wireless made the headlines a while back. They advertise that they will send a call to either wifi or the cell network, whichever is cheaper and available. This is basically the Holy Grail of mobile communication. As promising as this is, there are gotchas.

For one, Republic Wireless basically licenses coverage from Sprint not unlike Metro PCS and others. This means that your back-up coverage is fairly spotty.

Second, they want $20 a month. This is cheaper than a cell phone account, but only half what Metro PCS wants including data. I have a suspicion that you're paying for a "data-only" account.

Finally, you have to use their phone (a Motorola Defy XT). Even though the software would work fine on any phone, and even though there are other Sprint phones, they want you to use a specific (rapidly aging) model.

If you put this all together, Republic Wireless is not exactly the "liberator" that it claims to be. In fact, they are fairly rigid. It would be nice if one could use their own phone on their own provider, even if it's more expensive. Given all this, it may be just as cheap and convenient to track down a data-only provider, and just use SIP all the time.

Sunday, July 28, 2013

The State of Mobile VOIP: Skype

As mentioned in an early post, Skype is another audio/video conferencing tool available on Android devices. Skype has been pretty well supported for a few years. It started out requiring cellphone connections, however for a while you've been able to make wifi calls for free.

Again, Skype supports both audio and video. Skype has a proprietary encryption protocol which should keep out your neighbors from overhearing over wifi, however the government has been hacking at it for a while. (The NSA was actively hiring to crack this one protocol a few years ago.)

Recently, Skype was purchased by Microsoft. At least one blogger has proposed that Microsoft gave the government a back-door into the service. Then of course, the whole PRISM thing blew up. Therefore, I would not assume that is safe for planning your next coup.

Skype has a friendly social environment, where you can look up your friends and see if they are online and available for chat. Multi-party conferences are possible.

Finally, Skype has excellent telephone integration. You can get a Skype-in number such that people can call you and have it ring over wifi. Also, you can buy credits such that you can dial-out. Obviously, when talking with a legacy network, there is zero encryption (however the wifi is still relatively safe.) You can also activate (for free) voicemail for your account. Call forwarding is available but I believe that it incurs standard charges.

I would go so far as to say that Skype is a better version of Google Voice. That is, it is what everyone wishes Google Voice would be. When you're off-line, incoming calls go to voicemail, and you are notified via email about them. (It doesn't do transcription (yet).) You can receive calls over wifi for free - both cost free and hassle free. You can also make cheap 2c/minute calls, again, over wifi if necessary. Skype to Skype calls can include video and are theoretically encrypted, unlike Google Talk. [ Is this true ? Talk doesn't use SSL ? ]

You would think that Google Voice would make a nice companion to Skype. That is, you would have Google Voice ring both your cell phone and your Skype account so that, if your cell phone is out of the reception area, you could just pick up the call over wifi.

Unfortunately, it isn't this simple. When Google Voice rings both your cell phone and Skype account, your phone literally leaps out of your pocket ringing both numbers. Its a toss up which call will come in second (which trounces the first call) but it is usually Skype.

Additionally, if you have voicemail for these accounts, they will all pick up, conspiring to bury your Google Voice voicemail. I disable voicemail on Skype for this reason, but if I got rid of Google Voice, I would make Skype my primary voicemail.

What you need is a service that rings *either/or*. That is, if you're signed in with Skype, use that. Otherwise, use the cell phone. Once again, Skype trumps Google Voice here. Skype will do this, but you incur their cheap rates during the call. Also, Skype wants $5-6/month for the DID number.

hmm, if you pointed Skype at your Google Voice number, then all your phones would ring when you weren't signed in...

Sunday, July 21, 2013

My latest annual

I believe that capitalist markets do work, and that they promote competition among the best contenders. However, I believe they only work when people have the information to choose between those contenders, and are free to choose between them. If every candidate is a blind date, how are you supposed to pick the best ? How do you let others evaluate which is best ?

An airplane annual inspection doesn't fit into the perfect market model very well. You have to pay the entire cost up front, before you know anything about whether the plane will pass inspection or how much work it will require to make it airworthy again. Therefore, you have no idea what a mechanic will say before paying the money and getting the inspection. A mechanic can come back with a huge list of work that has to be done before he will sign off your airplane. You have no idea if a mechanic is picky or not, except through word of mouth.

Therefore, I feel it is helpful to the market that I share my experience with my last annual, with Able Air Corporation at Whiteman Airport in Pacoima. I will not say anything subjective about this experience - nothing good, nothing bad - only the facts so that other airplane owners can compare the experience to their's and make up their own minds, prior to laying down cash.

I own a 1975 Piper Warrior, basically a Cherokee 150.

I contacted Able because my previous mechanic left several items inoperative or degraded after the last annual. I fixed all of these issues except for one: The plane had the classic Cherokee "hard starting" problem. I suspected everything from the starter to the fuel system, but the owner of the shop had a look at the plane and suspected the magnetos. He then took a look in the logs and, sure enough, the magnetos hadn't been touched in over 1000 hours.

I let him inspect and repair the mags. When I got it back, the plane started right up. The starter still had trouble getting over the compression hump, but the "bump trick" still worked. However, instead of having to crank the engine for dozens of revolutions until the battery died, it started after a couple revolutions. My battery recharged from this effort much faster too.

From this experience, I felt comfortable letting Able Air do my annual inspection. They asked $1275 (15 x $85) for the inspection. I dropped off the airplane on May 7th.

I didn't get a call back until May 17th. When they came back with the results, they said that a couple ADs had not been complied with and that they'd have to be re-done. I have taken excellent care of my airplane, I've had every AD that was mentioned to me dealt with and I've had half a dozen mechanics look over my logs. None of them ever expressed an issue with the logs.

One of the ADs was to inspect and replace the attachment hardware of the flap lever. The AD had been addressed but the shop owner didn't like the entry in the AD compliance sheet. It said, "replaced bolt" when the AD asked for the bolt and bushing to be replaced. Note that the FAA's own suggested AD compliance sheet format leaves less space for "description" than the AD number itself, but this didn't sway him from demanding that the description be longer.

Complying with the AD was only estimated to cost 15 minutes and a bushing so I let them do it.

The other AD was the Lycoming crankshaft ID inspection AD. The plane's engine was overhauled in 2006. I suspect that, since it was being upgraded to 160HP, that mechanic now felt that the AD applied and dealt with it.

However, again the shop owner didn't like the evidence of compliance. All he could find was an entry about SB505(inspecting the ID), not SB530 in which you apply a simple coating to the inside diameter of the crankshaft. We called the other mechanic and he said there was no way they would have done SB505 without SB530.

After much haranging with the shop owner, I could not convince him that that mechanic simply forgot to add the additional entry. I reluctantly agreed that the next step was to take off the propeller and see if there was the word "PID" stamped into the prop plate which indicates "painted inner diameter." I had no idea if this would satisfy them but if they were going to force an inspection on me anyways, they would need to do this.

They took off the prop and sure enough, PID was stamped into the side of the plate. They accepted this as proof of compliance with SB530.

The number of issues that they found on the airplane during the inspection were, what I would call, small. They had to address the new control cable AD, they wanted to add a bushing to the airbox, tighten a rod in an aileron, re-charge the nose strut and replace the pilot yoke universal joint.

They had given me a price on the major parts, except strangely for the universal joint. I told them to go ahead with the repairs.

On the 29th, I got a call about the status of the plane, and to get confirmation that they could buy some parts. When they took out the airbox, they decided that the valve within it had to be replaced. Replacement airboxes are quoted at $1600. (Getting a valve alone is cheaper.) I asked what was wrong with it. He gave me his reasoning but fundamentally his concern was that warmer air would leak in and cause detonation. The readers may ask themselves, if warm air isn't supposed to cause detonation when carb heat is on, why would it do it when it's off, even with a leak ? In any case, I couldn't change his mind.

Then he informed me of the price of a new universal joint. The cheapest he could find was $265. I then asked why it needed to be replaced. He gave me his reasoning but the fundamental issue was that it was loose, that it had too much play. I protested that that wasn't enough to make it not airworthy. Again, the previous mechanics, including the one who addressed the control yoke AD, thought it was fine. I said I'd be out to look at the airbox, but I also wanted to check this loose play too.

On May 31st, I went out to the plane to check the play in the pilot yoke. There was a little play but it was, in fact, less play than what was in a nearly new 172 that they had in their hangar. I again tried to convince the mechanic that it was fine, but couldn't.

At this point, I just wanted the annual over so I "bought" the parts and allowed the mechanic to install them. I provided them the airbox valve on June 8th.

On June 13th, I called to check the status of the plane. The mechanic said it wasn't done. I informed them that I would be leaving on a trip, and that, if they would like the bill paid before July, it would have to be done by Saturday. The mechanic said not to worry about paying in July, and the bill certainly wouldn't be ready by Saturday.

On July 3rd, I called to check the status of the bill. The secretary said it wasn't done, but I could have the keys, and that the log had been signed off. I went and got the keys.

By July 16, no one had called me so I called and asked if the bill was ready. They said it was. I went, paid it and picked up the logs.

The bill was one third higher than the highest annual I've ever paid, including last years' during which they replaced all my brake lines. 7 out of 16 items on the bill are complying with ADs. One item I specifically asked them not to do (main strut servicing). Another item I have no idea what it is (main cup bearing ?); the mechanic never mentioned it. The hours are not itemized; there is only a total - 40.5.

The new, supposedly correctly written AD compliance sheet is no better than the previous ones. Many entries still say "C/W" ("complied with"), which the shop owner said was insufficient. And despite the lecture, during which the shop owner said that showing compliance had to include the measurements taken (for instance, if a bolt is supposed to be a certain diameter, the measurement of the diameter should be included) this shop owner didn't write down the compression values of the cylinders (for AD 2009-26-12) which my previous mechanic had always done. So for all that trouble, it appears that the ADs are in worse shape.

I hope this information helps someone else make a decision about their next airplane mechanic.

Thursday, July 4, 2013

The State of Mobile VOIP, part 5: SIP clients revisitted

Sorry no post in a while. Been on vacation, without broadband. :(

I'd like to correct an earlier statement, and report some encouraging findings.

- The Android SIP client -

I said that the Android built-in SIP client wasn't very good, and listed a few features that it lacked to provide proof of that statement. I've learned that its feature set isn't as small as I thought. (Instead, I simply couldn't get something to work, and assumed that since CSipSimple worked, that the built-in stack was insufficient. Alas, that is one of the sore spots of SIP: When something doesn't work, you don't know who to blame.)

The feature(s) that I mentioned didn't work concerned dialing regular phone numbers from the stock dialler over SIP. Namely, I said that the only thing that the built-in stack could do was dial someone@somewhere, i.e. SIP-to-SIP calls. Furthermore, that the only way to actually dial those numbers was to enter the address into the Contact list and select it. These 2 statements are untrue.

Assuming that you have an account where you can dial regular phone numbers (dial out capability), (and that your account has some money in its balance), you can dial any number - either from your address book or dialled manually - using this SIP account, straight from the stock dialler. I'll explain how after some soapboxing.

I like the idea of using the stock dialler because it doesn't require using extra software. CSipSimple isn't a small download. Furthermore, it doesn't always play nice with the stock dialler and Google Voice, if installed (not that making a SIP call from the stock dialler is trouble free either; see below.)

Don't get me wrong; CSipSimple is an awesome SIP client. It has CODECs galore, it has re-write rules, it can register multiple accounts, it has encryption and it has video (and these are just the features I can think of off the bat.) It really is a huge pile of awesome.

But if all you want to do is make SIP calls, and cheap international calls, it appears to work with some tweaking.

End of soapboxing; here's how to get it to work. I have an account with Mondotalk, so I'll use it as an example. Go into the stock dialler. Click Menu | Settings | Accounts. (Note that Menu | Accounts goes to an entirely different place; don't go there.) Click Add Account. Enter your username, password and, in my example, sip99.mondotalk.com. Click on Optional settings | Outbound proxy address. In my example, enter sip99.mondotalk.com again. Click Save.

You can play with the Receive incoming calls setting if you like, but it's not relevant to making calls.

Back out one level and click on Use Internet calling | Ask for each call or For all calls when data network is available.

Here's the important part: If you have Google Voice installed, set it to Ask for each call. If you have Skype installed, also set it to Ask for each, if that's possible.

When you want to make a SIP call, dial the number normally (from the Contact list or enter manually or click on a phone number in the webbrowser). If it then asks about Google Voice, say 'no'. If it asks about Phone vs Skype, pick Phone. It will then ask Mobile vs Internet call. Select the latter of course.

Update:

I've been using the stock dialler for a while now. I have to say I'm quite pleased with it.

One thing you should be aware of, if you're going to use it: Provide the complete country code while dialling. Mondotalk is an international carrier and assumes that the first digit(s) is part of a country code. Unfortunately, the stock dialler isn't as smart as CSipSimple and won't prefix a number for you. Therefore, you have to do it yourself.

For example, put a '1' in front of all your numbers that reside within the US. If you don't, your call likely won't connect, but if it does, you could be charged a fair amount of money for that first minute. Guess where country code 95 is ?

Sunday, June 2, 2013

The State of Mobile VOIP, part 4: SIP providers

There's a wide variety of SIP providers. Some are aimed at businesses trying to squeeze more phone lines in, some are aimed at immigrants trying to call home cheap, etc. Take a look around and try different ones (they're cheap, after all) until you find one you like. I will share my experience with 2 of the major providers that I've tried.

Most providers tend to be pretty careful about their customers. For instance, OnSip and Mondotalk require that you call them to confirm a purchase of minutes. I suppose this is to make sure that your set-up is working. This is a good thing because your client may not work with the provider.

The problems that you will see with clients are various. Depending on the provider, I can get certain combinations to register, but then it won't make a call. Or there won't be sound. In one direction. Or the other. Or both.

This may be because the NAT support isn't working, or that there isn't a compatible codec (even though they all support uLaw/ALaw.) Keep in mind, I'm not doing anything exotic. For many providers, I can't even call their own main number, much less a subscriber.

One provider that I've had some success with is CallCentric. They have cheap, simple plans and you can still get a DID number from them. In other words, there's nothing special about them. They're just who I was able to get a SIP stack to work with.

One issue with them is that they feel they need to collect a monthly fee to cover their 911 expenses. This will use up your balance steadily (but not quickly.) I don't make many calls and $20 would last me a long time, except for this fee.

The provider that I'm currently using is Mondotalk. They provide all the usual features. In call testing, I hear a slight delay but it's comparable to Google Voice, or Skype. I haven't tried any exotic codecs. My default works fine (and sounds better than my cell phone.)

Despite having a good client and provider, I wouldn't rely solely on SIP on my mobile phone. The networks you will run into are too varied and SIP's NAT hacks aren't reliable. Running SIP over your cell data may work if you a large or infinite bandwidth/data limit.

You may be asking, "But I see all these providers on the net ? Who's buying ?" Small businesses are using SIP to lower their phone bills. It works for them because they don't have to deal with NAT, and they have a static configuration with a provider that they are familiar with.

Next post: What *does* work reliably ?

Sunday, May 12, 2013

The State of Mobile VoIP, part 3: SIP clients

At this point in time (May 2013) there is an abundance of SIP clients for Android. 'Twas not so a short few years ago.

First, in early 2009 I believe, came sipdroid. I think it was the API additions of the Cupcake release that allowed the software to stream audio to/from the speaker/microphone. sipdroid was a simple client that allowed making basic SIP-to-SIP audio-only calls.

Later, as front-facing cameras became more prevalent, sipdroid added videoconferencing. I think it was the first app with video but I can't say for certain. They were certainly proud of the addition.

Other than this capability, sipdroid is fairly basic. It only allows 2 accounts and it doesn't seem to be possible to dial out of the second account. The second account appears to only be there for receiving calls.

sipdroid has some support for setting up a pbxes.org account, but that's not much of an addition.

The other major SIP client is csipsimple. It is a lot more sophisticated. Its major feature addition is encryption. It can use SRTP, ZRTP or just TLS. Additionally, csipsimple supports multiple accounts. Right from the dialler, you can pick whichever account you wish to use to make the call. Also, it comes with an account set-up wizard for major providers. csipsimple has both STUN and ICE support. Video conferencing is possible on csipsimple but I don't know the details. The maintainer - Regis Montoya - is very responsive and generally cool guy.

It used to be that the version of csipsimple in the Android market was useless. It wouldn't make calls, and you had to download the latest nightly version to get anything that worked. However, the market version has been pretty good for a while now, and I think they even just uploaded the blessed 1.0 version.

There is a separate download for the extra CODECs. I would recommend them if the people you talk to use them also, but I personally think the regular CODECs are fine.

The last client I should mention is of course the built-in SIP stack that originated in Gingerbread. It is quite basic. It does not integrate with the dialler. All it can do is call other SIP targets. In the Contacts application, if you've ever seen "Internet call", this is what they're for. You enter something like sip:someone@someplace.com and then you can call it. It only supports G.711 (ulaw and alaw). It doesn't support STUN or ICE, although occasionally it will work (I assume if your network will "fix up" the packet for you.) Frankly, I place it roughly in the category of "fun toy", like walkie talkies when you were a kid, but I wouldn't rely on it.

The hands down favorite is csipsimple. It just does everything and if it doesn't, you can re-configure it. Since it has matured, I've actually been using it for most of my calling.

Which brings us to the next important topic...

Next: SIP providers

Thursday, May 2, 2013

The State of Mobile VOIP, part 2: SIP

I'm going to start this series discussing the grand daddy of videoconferencing - SIP. SIP stands for Session Initiation Protocol, which only does call-setup, but the acronym has come to refer to the entire protocol family. The family includes SDP - Session Description Protocol - which describes the media protocols (G.711, Speex, etc.) that each client supports - and RTP - real-time protocol - which is like a real-time, multiplexing version of UDP.

SIP was designed by data comm guys so it "fits" quite well in the Internet world. It is extensible, unlike the proprietary counterparts. It is fairly simple (despite its reputation). In fact, the packets are ASCII text. SIP typically runs over UDP port 5060.

Because SIP uses UDP, and because it was designed before NAT became prevalent, SIP has to play games in order to work through a NAT router. When SIP sends out its initiation packet, it puts the port number that media packets should be sent back to on the originating host. Since this port is mangled by NAT routers, SIP stacks must first figure out which port the outside world sees.

There are various protocols for discovering this. Commonly used is STUN - Simple Traversal of UDP through NAT. First, the stack will send a packet originating from the media port to an external server, typically port 3478. This server will reply with the port that it saw the packet from i.e. the port that NAT switched the packet to.

When the SIP stack gets this reply, it can put the externally reachable port into the SIP initiation packet. This will allow the called host to send media packets back to the originating host.

[ pictures! ]

As mentioned before, a SIP packet will contain an SDP payload. This message lists all the codecs that the caller supports. The called host will reply with the common codec that it prefers, if it accepts the call.

Once the call is established, packets travel directly between the two endstations. This is important, and different from protocols like Skype and Redphone where the packets first travel to a central server and then out to the recipient.

SIP has a variety of ways that it can encode the sound of voice into data. The classic way is to just do what the phone company does: G.711 or 8 bit logarithmic samples at 8kHz. More advanced methods can produce much better quality at a lower bitrate. They work by simply modelling the configuration of the human vocal path (commonly known as Linear Predictive Coding.) These include the granddaddy GSM, and newer codecs like CELP and SILK.

Calls may be encrypted in one of at least two ways - SRTP and ZRTP. SRTP uses SSL. ZRTP uses a public-key system not unlike PGP. No surprise it was invented by Phillip Zimmerman.

Next time: SIP clients for Android.

Wednesday, April 24, 2013

Regenerative Faking


I drove the Leaf to my brother's (in Acton) on Sunday, partly knowing I couldn't make it back. I forgot the charge cable so my plan was to hit the Kohl's on the way back.

At the top of Escondido Pass (3200 feet), the gauge clicked from 4 bars to 3. I figured that, since the rest was downhill, it would charge and flip back to 4 soon. I had it in ECO mode, I turned off the AC to help it and I even followed a U-Haul doing 55.

Despite losing 1500 feet, and showing 3 dots of recharge the whole time, it never flipped back to 4. I chalked this up to hysteresis.

However, driving up to Kohl's, it flipped from 3 to 2. Therefore, not only didn't it charge at all, but it in fact used about the same energy as if it was driving on level ground the same distance. The dots are a lie.

So I don't know what Nissan is trying to sell but the regenerative braking doesn't work for beans. You might leave it on to extend your brake life, or if you just like the engine braking behavior (I came from a manual transmission), but don't fool yourself into thinking it's doing anything.

On the bright side, charging at Kohl's was quick and convenient. The Chargepoint app is great at telling you where the chargers are. The in-dash map is completely worthless (for many reasons) unless you absolutely need to find a Nissan dealer so you can buy a different car or chew them out about their crappy regenerative braking.

Wednesday, April 3, 2013

The state of mobile VOIP, part 1


I recently made another effort to get VOIP working on my cell phone. I had acquired a new phone with Ice Cream Sandwich, Google's latest Android software, but hadn't set-up its cell provider yet. I had many reasons for setting up VOIP but not having a provider yet gave me an extra incentive to see if I could get reliable enough service without one. The goal was to be able to make and receive calls without a cell provider. Perhaps later, if I got a cell provider, the goal would be to be able to make and receive calls over a data connection without using minutes.

My other reasons for wanting to set-up VOIP were:
  • better quality - Legacy phone networks (and even VOIP duplicating the G.711 standard) only sample 8 bits at 8kHz. This is crap compared to, for example, Speex which can sample up to 32kHz! Granted, sampling rate isn't everything but at least its an improvement.
  • video - Optimally, if the dialler realized that it was calling a VOIP peer, it could place a video call.
  • encryption - Some clients can strongly encrypt which is nice because we now know that, even in the US, the government is actively listening to phone calls.
  • price - Theoretically, calls over wifi are free, but even if you need a provider, prices of 2c a minute are common. 500 minutes a month is only $10.
What are our options ? Here is an abbreviated history of videoconferencing.
  • H.323/Netmeeting - This was the first widely used videoconferencing technology. It was created before firewalls and NAT, however, and it is fairly proprietary so it is infrequently used (outside of pure Windows houses.) I mention it for completeness' sake.
  • SIP - This was the first standards-based protocol to see widespread adoption. It is still used heavily today. However, it too was created before NAT and so needs help to slip into most networks.
  • Skype - This is probably the most used videoconferencing tool. It has good quality and security, and has NAT traversal built-in, but it is proprietary.
  • Google Talk - Google's proprietary "social instant messaging" protocol can be used as a videoconferencing or telephone tool.
  • IAX - Inter-Asterisk Exchange is a semi-open protocol that, like Skype, was designed post-NAT, however support for it is quite rare in the mobile market. I mention it for completeness' sake.
A recent addition is Republic Wireless. It is attempting to market what I am trying to do homebrew: seamlessly move between networks (and use the cheapest, highest quality choice available) without callers realizing.

I will describe my trials and tribulations trying to use most of these technologies in the following posts.